git push The requested URL returned error: 403 Forbidden while accessing

 错误提示信息:

error: The requested URL returned error: 403 Forbidden while accessing https://github.com/xingfupeng/test.git/info/refs
fatal: HTTP request failed

 

解决方案:

修改.git/config文件,将下面的代码:

[remote "origin"]  
    url = https://github.com/xingfupeng/test.git

改为:

[remote "origin"]  
    url = https://xingfupeng@github.com/xingfupeng/test.git

 

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

posted @ 2018-02-28 15:07  邢富鹏  阅读(616)  评论(0编辑  收藏  举报