解决github push错误The requested URL returned error: 403 Forbidden while accessing

来源:互联网 发布:nginx处理空header 编辑:程序博客网 时间:2024/06/10 09:31

github push错误:

error: The requested URL returned error: 403 Forbidden while accessing https://github.com/sunzhy/MyRepository/info/refsfatal: HTTP request failed

解决方案:

ls -avim .git/config

修改:

[remote "origin"]      url = https://github.com/xxx/MyRepository

为:

[remote "origin"]      url = https://xxx@github.com/xxx/MyRepository

再次git push,弹出框输入密码,即可提交

0 0