相关问题: netrc not accepted by git和 Git - How to use .netrc file on windows to save user and password
我正在尝试将更改推送到 code.google.com git 存储库。我正在使用 Git 扩展。我的 HOME 变量在 Windows 和 Git Bash 中都设置了。
C:\> echo %HOME%
C:\Users\Username
$ echo $HOME
/c/Users/Username
我在 %HOME% 中添加了一个名为 _netrc 的文件
machine code.google.com
login username@gmail.com
password GOOGLEGENERATED
显然用户名被我的用户名替换,GOOGLEGENERATED 是谷歌生成的密码。尝试推送时,我收到此错误消息:
C:\Program Files\Git\bin\git.exe push -u --recurse-submodules=check "origin" master:master Done fatal: remote error: Invalid username/password. You may need to use your generated googlecode.com password; see https://code.google.com/hosting/settings
相关问题表明一切都已正确设置,但仍然无法正常工作。有什么想法吗?
最佳答案
从 .git/config
中的 origin 的 url 条目中删除 username@
关于windows - 使用 git 在 Windows 中推送到 code.google.com,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9491761/