解決github git push錯誤The requested URL returned error: 403 Forbidden while accessing

github push錯誤: html

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:CENTOSgit

解決方案:github

vim .git/configvim

在你的當前目錄裏面有一個隱藏文件.git(前面有一點),這個裏面有個config文件,裏面有一個url的值,須要把github.com這域名前面的字母改爲你的名字url

修改 spa

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

爲:

[remote "origin"]
	url = https://wangz@github.com/wangz/example.git
紅色部分改爲你註冊github時的名字就能夠了。

再次git push,彈出框輸入密碼,便可提交code

相關文章
相關標籤/搜索