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
在你的當前目錄里面有一個隱藏文件.git(前面有一點),這個里面有個config文件,里面有一個url的值,需要把github.com這域名前面的字母改成你的名字
修改
[remote "origin"] url = https://github.com/wangz/example.git
為:
[remote "origin"]
url = https://wangz@github.com/wangz/example.git
紅色部分改成你注冊github時的名字就可以了。
再次git push,彈出框輸入密碼,即可提交