[英]fatal: unable to access 'https://github.com/SOME_NAME/SOME_PROJECT.git/': The requested URL returned error: 403
git push
remote: Permission to newGithubAccount/newGithubAccountProject.git denied to myOldGithubAccount.
fatal: unable to access 'https://github.com/newGithubAccount/newGithubAccountProject.git/': The requested URL returned error: 403
I got the 403 error, I know it's that incorrect access was found, and the error message clearly shows me why: Because my git push was using my previous github account's credentials, however, I've updated my git global config and generated new .ssh/id_rsa
and added the ssh key into my new github account. 我得到了403错误,我知道发现了错误的访问,并且错误消息清楚地告诉我原因:因为我的git push使用了我以前的github帐户的凭据,但是,我已经更新了我的git全局配置并生成了新的.ssh/id_rsa
并将ssh密钥添加到我的新github帐户中。 But still this error persists, I've searched extensively on this site and on Github.help page, but still no luck, please help. 但是这个错误仍然存在,我在这个网站和Github.help页面上进行了大量搜索,但仍然没有运气,请帮忙。
I think I need to somehow completely clear my cache for the previous github account or delete it, then I could access github with my new account. 我想我需要以某种方式完全清除我之前的github帐户的缓存或删除它,然后我可以使用我的新帐户访问github。 Or else ways, please advise! 或者方法,请指教! Thanks a lot! 非常感谢!
The previous remote is configured to use the HTTP protocol. 以前的远程配置为使用HTTP协议。 You can use the set-url
remote command to update your remote to use the SSH based protocol. 您可以使用set-url
remote命令更新远程以使用基于SSH的协议。
git remote set-url origin git@github.com:newGithubAccount/newGithubAccountProject.git
https://help.github.com/articles/changing-a-remote-s-url/ https://help.github.com/articles/changing-a-remote-s-url/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.