在我的 Windows 10 机器上,当我运行时:
git config --global -l
它失败并显示消息:
致命:无法读取配置文件“%HOMEDRIVE%%HOMEPATH%/.gitconfig”:
没有这样的文件或目录
两个环境变量看起来都不错(对我来说),并且 .gitgconfig 是我认为应该在的位置:
C:\Users\BRITTG2>echo %homedrive%
P:
C:\Users\BRITTG2>echo %homepath%
\
C:\Users\BRITTG2>dir %homedrive%%homepath%.gitconfig
Volume in drive P is home
Volume Serial Number is 8076-09DA
Directory of P:\
03/25/2019 02:34 PM 658 .gitconfig
1 File(s) 658 bytes
0 Dir(s) 2,908,136,849,408 bytes free
我缺少什么?
以管理员身份运行 powershell(但您可以使用 cmd、Git bash 等)并重试。
就我而言:
cd C:\ROstuff\ROprojects\Python\
git init
git config --global user.name "Rodrigo H Padilla"
git config --global user.email "[email protected] /cdn-cgi/l/email-protection"
git config --global -l
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)