Quand vous essayez de vous connecter en mode SSH à sur un ordinateur Linux, vous pouvez voir le message suivant dans votre terminal :
$ ssh -vT git@github.com
> ...
> Agent admitted failure to sign using the key.
> debug1: No more authentication methods to try.
> Permission denied (publickey).
Pour plus d’informations, consultez ce rapport de problème.
Résolution
Vous devez être en mesure de corriger cette erreur en chargeant vos clés dans votre agent SSH avec ssh-add :
# start the ssh-agent in the background
$ eval "$(ssh-agent -s)"
> Agent pid 59566
$ ssh-add
> Enter passphrase for /home/you/.ssh/id_rsa: [tippy tap]
> Identity added: /home/you/.ssh/id_rsa (/home/you/.ssh/id_rsa)
Si votre clé n’a pas le nom de fichier par défaut (/.ssh/id_rsa), vous devez passer ce chemin à ssh-add :
# start the ssh-agent in the background
$ eval "$(ssh-agent -s)"
> Agent pid 59566
$ ssh-add ~/.ssh/my_other_key
> Enter passphrase for /home/you/.ssh/my_other_key: [tappity tap tap]
> Identity added: /home/you/.ssh/my_other_key (/home/you/.ssh/my_other_key)