Github SSH Permission denied to deploy key

Issue

I created a fresh repo, was able to clone with SSH and commit and everything. But when I try to push I get the following error:

ERROR: Permission to Ronin11/MealPlanr.git denied to deploy key
fatal: Could not read from remote repository.

Please make sure you have the correct access rights

Using:

ssh -T [email protected]

I was able to verify that my ssh key is working. I have no idea what happened. This was just working the other day. I haven’t touched these settings in months.
All this was using the terminal on Mac.

Help!

Solution

You mentioned you were using OSX. If you’re on 10.12.2+ it may be a problem with your ssh config. Github’s documentation has a note about that.

https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

Specifically they say add the following to ~/.ssh/config

Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa

Hope this helps

Answered By – Derek Hunter

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published