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://MrGCY@github.com/MrGCY/ThirdPartyShareLoginAndPay.git

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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容