github push错误:
git push
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/wangz/future.git/info/refs
git version 1.7.1
OS:CENTOS
解决方案:
vim .git/config
修改
[remote "origin"]
url = https://github.com/wangz/example.git
为:
[remote "origin"]
url = https://wangz@github.com/wangz/example.git
再次git push,弹出框输入密码,即可提交
本文介绍了一种常见的GitHub操作问题——Push时出现403 Forbidden错误的解决方案。通过修改.git/config文件中的远程仓库URL格式并重新进行认证,可以成功提交代码。
4万+





