Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permission denied (publickey) on github

Tags:

git

github

I work to understand Ruby on Rails with a tutorial of M Hartl.
I have finished chapter 6 and git push the work on git-hub, but I received this error:

rene@Linux-Ubuntu:~/rails_projets/sample_app$ git push Permission denied (publickey).
fatal: The remote end hung up unexpectedly

I reinstalled a new publickey as a Help-Git instruction

    debug1: Next authentication method: publickey
    debug1: Offering DSA public key: rene@Linux-Ubuntu
    debug1: Authentications that can continue: publickey
    debug1: Offering RSA public key: rene@Linux-Ubuntu
    debug1: Authentications that can continue: publickey
    debug1: Trying private key: [~/.ssh/id_rsa]
    debug1: Trying private key: [~/.ssh/id_dsa]
    debug1: No more authentication methods to try.
    Permission denied (publickey).

And I have the files in a repository:

rene@Linux-Ubuntu:~/.ssh$ ls
ak.bak config id_dsa id_dsa.pub id_rsa id_rsa.pub key_backup/ known_hosts

What did I do wrong?

like image 242
René Avatar asked Nov 04 '22 01:11

René


1 Answers

Have you told github about your public key?

https://github.com/settings/ssh

(it's the contents of id_rsa.pub that you need)

like image 107
Attila Szeremi Avatar answered Nov 07 '22 23:11

Attila Szeremi