首页 > 代码库 > 解决github push错误The requested URL returned error: 403 Forbidden while accessing

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

github push错误:

git push -u origin master
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/huangzhazha/studygit.git/info/refs
fatal: HTTP request failed

git version 1.7.1


OS:CENTOS

解决方案:

vim .Git/config

修改

[remote "origin"]  
    url = https://github.com/huangzhazha/studygit.git

为:

[remote "origin"]
        url = https://huangzhazha@github.com/huangzhazha/studygit.git

再次

git push -u origin master

弹出框输入密码,即可提交。

本文出自 “焯焯先生的博客” 博客,请务必保留此出处http://chaohuang.blog.51cto.com/6843018/1895880

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