Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git and ssh authorizating

Tags:

git

github

ssh

rsa

I can't login to github with generated ssh-keys. I've followed this manual: http://help.github.com/linux-key-setup but at step:

ssh [email protected]

I get:

Agent admitted failure to sign using the key. Permission denied (publickey).

What's wroing? And, of course, I'm adding my own user email.


Tried dsa-key, the same thing.

like image 645
Max Frai Avatar asked Mar 30 '10 14:03

Max Frai


1 Answers

This issue occurs mainly due to the following reasons :

  • The public and private key pair is wrong. You have to verify the key public key on the server/ your git account where you have placed the public key. Even a small space or tab will result in the error.
  • If you are sure your public key is correct, then check the format of public key in your ~/.ssh folder in your machine. For openssh you cannot use a public key in puttygen format and visa-versa. To change the format you can use the following command using your private key

    $ ssh-keygen -e -f ~/.ssh/id_rsa > ~/.ssh/id_rsa_com.pub
    $ ssh-keygen -i -f ~/.ssh/id_rsa_com.pub > ~/.ssh/id_rsa.pub

  • Finally check if you have added your keys to the ssh client in your system. You can do so by using the following commands

    $ eval "$(ssh-agent -s)"

    $ ssh-add

like image 169
kirancodify Avatar answered Sep 26 '22 01:09

kirancodify