Friday, 4 November 2016

Github error: permission denied (publickey). fatal could not read from remote repository

permission denied (publickey).
fatal could not read from remote repository


If you are facing this error, then follow me:

run:

eval "$(ssh-agent -s)"

then you should see some output like:

Agent pid 59566

then run:

ssh-add -l

If you can see some output , then you have publickey, you can put it into github (follow the last link of this post), otherwise you need to:

https://help.github.com/articles/generating-an-ssh-key/

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

run:

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

above email is your github email.

It will ask you which place to save the key and set a password, you just need to type "enter" for all of them.

Then, run this:

ssh-add ~/.ssh/id_rsa


Then follow below to link put the key onto github:

https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/





No comments:

Post a comment