Github SSH Key

Recently, I tried to clone a repository I was working on in GitHub that I had created, but I received the following error:

Permission denied (publickey).
fatal: Could not read from remote repository.Please make sure you have the correct access rights
and the repository exists.

Apparently, I needed to create an SSH key and add it to Github SSH Keys in order to access the repository. To do this, I followed these instructions (on

Generate SSH key using ssh-keygen -t rsa -b 4096 -C "[email protected]".
Copy the output of cat
Paste the above copied output into your Github profile -> Settings -> SSH and GPG Keys -> Add new SSH key

Regarding this, I created an SSH key, but couldn’t find it, so I ended up following the path: /Users/jessicapeng/.ssh/ and I ran command cat .ssh/ once I was in the directory jessicapeng in order to get it. Then, I followed the instructions and went to my Github Profile > Settings> SSH and GPG Key > Add SSH Key. And afterwards, I was able to successfully clone it and use git with it!

2 Replies to “Github SSH Key”

Leave a Reply

Your email address will not be published.