Git push error under CENTOS 6.7

$ git add file
$ git commit -m "xxxx"
$ git push

error: The requested URL returned error: 403 Forbidden while accessing https://github.com

fatal: HTTP request failed

Change your ~/.gitconfig as follows:

$ cat ~/.gitconfig 
[user]
	name = xxx
	email = xxx@gmail.com
[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url= https://name@github.com/name/xxx.git
Leave a Reply

Your email address will not be published. Required fields are marked *