Reading Time: < 1 minute

git@github.com: Permission denied (publickey)

If you ever receive this message when attempting to clone a git repository try the following.

  • eval “$(ssh-agent -s)”
    • Should return: Agent pid [process pid]
  • ssh-add ~/.ssh/id_rsa ( Run ssh-keygen to generate a key if you haven’t already )
    • Should return Identity Added: …
  • Add your ~/.ssh/id_rsa.pub file to your GitHub keys if it’s not already there

This article assumes you are running a unix based system like Linux or macOS.

Sharing is caring!

Leave a comment