Permission denied (publickey) errors with git and GitHub on OS X
Although things were working I just started getting "Permission denied (publickey)." errors while trying to push to GitHub.
The solution was to create a config file under ~/.ssh/ as outlined at the bottom of the OS X section of this page.
Here's the file I added, as per the instructions on the page, and my pushes started working again:
Host github.com User git Port 22 Hostname github.com IdentityFile ~/.ssh/id_rsa TCPKeepAlive yes IdentitiesOnly yes
(Either that or it was a temporary hiccup with GitHub and I've fallen into an ad-hoc fallacy in thinking that the config file did the trick — it's bedtime so testing that will be for another day!)
If any git wizards have theories as to what could have caused my pushes to stop working and why this config file is necessary, I'd appreciate a quick note in the comments.
Comments
by Aaron Feng on 2008-12-30 01:13:21
by Mandar Vaze on 2009-01-14 08:06:12
by Joe on 2009-11-15 20:24:01
by Marc Limotte on 2009-12-28 17:51:52
by Ben on 2010-03-24 20:03:40
by Iain Barnett on 2010-07-16 10:08:55