您的位置:首页 > 产品设计 > UI/UE

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

2016-03-08 14:31 471 查看
github push错误:

[html]
view plain
copy
print?





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

修改

[plain]
view plain
copy
print?

[remote "origin"]  
    url = https://github.com/username/example.git  

为:

[plain]
view plain
copy
print?

[remote "origin"]  
    url = https://username@github.com/username/example.git  

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

或者修改为

[remote "origin"]  
    url = https://username:password@github.com/username/example.git

也可以解决 并且省去了输入密码一步
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: