Why does Git ignore ~ โ€‹โ€‹/ .ssh / id_rsa, want ~ / .ssh / id_dsa or ~ / .ssh / id_ecdsa?

This is the error I get:

no such identity: /home/eduan/.ssh/id_dsa: No such file or directory no such identity: /home/eduan/.ssh/id_ecdsa: No such file or directory Permission denied (publickey). 

What happens when I try to click, or in this case, when I do ssh -T git@github.com .

I generated the id_rsa and id_rsa.pub files correctly.

How can i solve this? I am using Arch Linux with E17 BTW.

EDIT :
Would @kortix do the following for this ?:

 Host github.com IdentityFile ~/.ssh/id_rsa 

This doesn't seem to work for me ... I get the following when I hit Git:

 Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 

I made sure that the repo exists, and I also updated the remote URL with git remote set-url origin git@github.com :Greduan/dotfiles.git .

I also added an SSH key to the list of accepted SSH keys on GitHub. What else should I do?

+4
source share
1 answer

The SSH client will tell you about id_dsa (pay attention to โ€œdโ€ - this means DSA), while you created id_rsa (pay attention to โ€œrโ€, which stands for RSA).

You must either generate a DSA key or specify the SSH for which "identity" is used (private key). This can be done using the IdentityFile directive under the custom Host entry in your ~/.ssh/config file for the remote github device (see the ssh_config(5) manual page).

Update (2013-04-29 to make it more understandable to the next reader). The essence of the problem was that the OP has the wrong owner (root) on its key ~/.ssh/id_rsa , so the OpenSSH client first tried to read this key, failed, and then continued to read ~/.ssh/id_dsa and ~/.ssh/id_ecdsa , in turn, which also did not work; this time because they simply weren't there. With no more keys to use for packet authentication and missing authentication mechanisms, the SSH client failed. These "No such identity ..." messages were actually warnings.

+6
source

All Articles