Tuesday, July 8, 2014

github push 403 and Permission denied

Initially I was getting

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


$ git push origin master

I read a forum post that recommended

$ vi .git/config

and changing the url line from https://github.com/.. to ssh://github.com/..

and then generating public/private keys and adding this to github.  After doing so I was getting

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

eventually I solve this by changing that url line in .git/config to

url = git@github.com:LOGIN/REPONAME.git

... I also made sure to run

git config --global user.name "LOGIN"
git config --global user.email EMAIL
Post a Comment