Saturday, May 27, 2017

OSX: SSH for github

The problem is that on OSX the github key needs to be added to the ~/.ssh/config file

https://help.github.com/articles/error-permission-denied-publickey/

$ ssh -T git@github.com
Permission denied (publickey).

ssh-add -l -E md5

The agent has no identities.

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



If you're using macOS Sierra 10.12.2 or later, you will need to modify your ~/.ssh/config file to automatically load keys into the ssh-agent and store passphrases in your keychain.
Host *
 AddKeysToAgent yes
 UseKeychain yes
 IdentityFile ~/.ssh/
$ cd ~/.ssh
$ vi config
$ ssh -T git@github.com
Hi ! You've successfully authenticated, but GitHub does not provide shell access.

No comments:

Post a Comment