ERROR: Permission to durrantm/linker.git denied to kevinzen. fatal: The remote end hung up unexpectedly
I've tried a lot of things to change/set my identity and get rid of that 'kevinzen'
Update - final resolution was that I had added my public key... but... I had missed a few characters so it was invalid. Pasting in the correct key on github fixed it
I have ~/.ssh/
with files
config
id_dsa
id_dsa.pub
id_kb_rsa
id_kb_rsa.pub
id_rsa
id_rsa.pub
known_hosts
I have done
git config --global user.name
git config --global user.email
git remote add origin [email protected]:durrantm/linker.git
I have added my local ssh key with my info (not kevinz) for this machine to github ssh keys.
I also tried:
ssh [email protected].
The authenticity of host 'github.com. (207.97.227.239)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com.' (RSA) to the list of known hosts.
PTY allocation request failed on channel 0
wasn't sure about the PTY error. Still stuck.
If git push origin master not working , all you need to do is edit that file with your favourite editor and change the URL = setting to your new location. Assuming the new repository is correctly set up and you have your URL right, you'll easily be able to push and pull to and from your new remote location.
GitHub's Permission denied (publickey) error is usually caused by one of the following three issues: You have used an incorrect email address in the GitHub SSH URL. You have not configured your public SSH key in your GitHub account. You must create GitHub SSH keys to be used by the secure shell.
Did you install your key at GitHub? Have you read help section there?
You can list your own keys as saved at GitHub by:
curl https://github.com/<username>.keys
Have you checked that one of the keys is a match to one of your keys? Compare:
cat ~/.ssh/id_*.pub
I had the same problem, my solution was simple. I already have my keys setup and everything and kept trying to run:
git config --global user.name IceMupppet
After looking through my ~/.ssh/ I noticed that running:
ssh-add -l
I saw that to simply use the right git account I just added the right file:
ssh-add ~/.ssh/id_IceMupppet_rsa
... then a git push origin master
worked fine. I have an alias on my ssh config to use different keys for my work and personal, but still had to do this step for some reason.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With