git push 时遇到的错误

github push错误:

remote: Permission to MrGCY/ThirdPartyShareLoginAndPay.git denied to JonJSON.
fatal: unable to access 'https://github.com/MrGCY/ThirdPartyShareLoginAndPay.git/': The requested URL returned error: 403

git版本:git version 2.10.1

解决办法:

1.使用终端命令
vim .git/config 打开文件
2.修改

[remote "origin"]
url = https://github.com/MrGCY/ThirdPartyShareLoginAndPay.git

改为

[remote "origin"]
url = https://[email protected]/MrGCY/ThirdPartyShareLoginAndPay.git

修改成功后保存并退出
然后再git push 输入仓库密码即可进行提交

你可能感兴趣的:(git push 时遇到的错误)