Git 远程:无效的用户名或密码。致命:的身份验证失败
我使用Git for Windows。我创建了SSH密钥,并将其添加到GitHub设置的密钥列表中。现在我尝试使用它,但我得到了错误:Git 远程:无效的用户名或密码。致命:的身份验证失败,git,github,Git,Github,我使用Git for Windows。我创建了SSH密钥,并将其添加到GitHub设置的密钥列表中。现在我尝试使用它,但我得到了错误: $ git push origin master Username for 'https://github.com': Andrey-Bushman Password for 'https://Andrey-Bushman@github.com': remote: Invalid username or password. fatal: Authenticati
$ git push origin master
Username for 'https://github.com': Andrey-Bushman
Password for 'https://Andrey-Bushman@github.com':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/Andrey-Bushman/sandbox.git/
如何修复它?首先确保通过执行以下命令成功创建ssh密钥:
$ ssh -T git@github.com
应该打印出来
“嗨,Andrey Bushman!您已成功通过身份验证,但GitHub不提供shell访问。”
如果没有,请参阅
完成后,请执行以下步骤:
git@github.com:/.git
就你而言:
git@github.com:Andrey Bushman/.git
git推送原点
就你而言:
git推送原始主机
你应该使用用户名
git
。你能写下你的git-remote-v
结果吗?>如果它打印“嗨,安德烈·布什曼!你已经成功通过身份验证,但GitHub不提供shell访问。”是的,它会打印出来。>git@github.com:Andrey Bushman/.git我必须在哪里使用它?不,首先,您必须使用ssh克隆repo,然后使用origin name推送它。