Can't authenticate with git

1

I'm trying to publish changes to a project in GitHub, but I keep getting this authentication error:

root@nodeTwo:/usr/local/src/cedit-dev# git push origin master
Username for 'http://www.github.com': taylorholberton
Password for 'http://taylorholberton@www.github.com': 
fatal: Authentication failed
root@nodeTwo:/usr/local/src/cedit-dev#

taylorholberton is my username at github.com and my password is the same one I use for the website (right?), so how can I be getting an authentication error?

One reason might be that my email isn't http://taylorholberton@www.github.com. If that's the reason I'm getting an error, how do I fix it?

I've looked through all the beginners pages from help.github.com and I haven't found any information relative to this.

Update:

Output of git remote -v:

origin  http://www.github.com/taylorholberton/cedit (fetch)
origin  http://www.github.com/taylorholberton/cedit (push)

tay10r

Posted 2013-08-06T06:17:14.860

Reputation: 533

Github really wants you to use key-based authentication. You really should take the time to set that up. – Zoredache – 2013-08-06T06:19:49.027

@Zoredache is that the reason I'm getting an error? – tay10r – 2013-08-06T06:20:19.607

No idea. I just have never actually used password authentication with github. – Zoredache – 2013-08-06T06:23:41.857

@Zoredache I'm logged in now through ssh and it's still not working – tay10r – 2013-08-06T06:32:28.587

You have a 'www' in the origin URL; try removing that. I don't think GitHub uses that vhost. – JoshRagem – 2013-08-06T06:52:24.483

Wait... What is the output of git remote -v ? – JoshRagem – 2013-08-06T06:54:05.723

@JoshRagem how do I remove www.? – tay10r – 2013-08-06T07:11:01.610

Answers

1

When you go to your repository on the website, there's a "clone URL" section on the right, below the Settings tab and above the Clone in Desktop and Download Zip buttons. You should be using that URL, not the one in your browser.

To change the remote URL:

git remote set-url origin <URL GOES HERE>

Then try to push again.

Robert Rouhani

Posted 2013-08-06T06:17:14.860

Reputation: 323

thanks, that works. I have no idea why www. was added in the first place – tay10r – 2013-08-06T07:22:59.527