Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permission Denied (publickey)/fatal: The remote end hung up unexpectedly?

Tags:

git

github

ssh

So I started the production for a Jekyll site using the following commands,

$ git clone https://github.com/plusjade/jekyll-bootstrap.git USERNAME.github.com
$ cd USERNAME.github.com
$ git remote set-url origin [email protected]:USERNAME/USERNAME.github.com.git

After getting a local and github repo set up, I tried to send the changes to github,

$ git push origin master

to find this,

Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

What did I do wrong? What can I do to resolve this error?

like image 396
sharksfan98 Avatar asked Oct 19 '13 21:10

sharksfan98


People also ask

How do I fix permission denied Publickey password?

If you want to use a password to access the SSH server, a solution for fixing the Permission denied error is to enable password login in the sshd_config file. In the file, find the PasswordAuthentication line and make sure it ends with yes . Find the ChallengeResponseAuthentication option and disable it by adding no .


2 Answers

The problem is that you haven't initialized SSH keys with Github. This solved it for me:

cd ~/.ssh && ssh-keygen
cat id_rsa.pub 

and copy the key into the SSH settings of the Github website.

Then you're good to continue.

like image 113
Laurence Avatar answered Sep 19 '22 15:09

Laurence


Permission denied (publickey) means that that the server rejected your connection. Check https://help.github.com/articles/error-permission-denied-publickey for details

like image 45
Michael Ver Avatar answered Sep 17 '22 15:09

Michael Ver