Note: I\'m not a newb, and I\'ve done this a gazillion times, but for some reason today it decided not to work.
I keep getting the Permission denied (publickey).>
If it works for other repositories, but not one in particular, then you are probably using the wrong remote url(i.e. https
instead of git@github.com
)
First, double check that your git ssh connection is working:
ssh -T git@github.com
If it works, check your remote:
git remote -v
it will display something like this:
origin https://github.com/username/repo(fetch)
origin https://github.com/username/repo(push)
If the remotes indicate https
at the beginning, then you need to change this url with:
git remote set-url origin git@github.com:usertname/repo.git
Go here for more details.