我关闭了一个在 google code 上发布的 PHP 项目。
问题是当我尝试使用以下命令时:
git push origin master
我收到以下身份验证错误消息:
fatal: remote error: Invalid username/password.
You may need to use your generated googlecode.com password; see https://code.google.com/hosting/settings
如何强制 Git 提示输入用户名和密码以解决此问题?
最佳答案
参见 this answer .
转到您获取密码的错误消息中的 URL,然后按照说明进行操作。
For Git repositories, you can add the following line to your .netrc file recording your password for each repository domain you have commit access to. Make sure you have set the permissions on .netrc so that only your user account can read it.
machine code.google.com login user@gmail.com password qwertyasdfg
我还会在该答案下引用一条可能有帮助的评论:
removing the username from the .git/config forced git to reask for username and password
关于git - 强制 Git 提示输入用户名和密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13540063/