Why is Git using the wrong ssh key

gitsshssh-keys

On my Windows PC, I am using Pageant and putty to login to a remote ubuntu with my ssh key (e.g. named my-key).

On ubuntu I would like to fetch code from a remote git repository via ssh. There is a local ssh key in ~/.ssh for that user (e.g. named coders-key) which is supposed to be used with the remote git repository.

For some reason, git is using the key I used to login to the ubuntu (my-key) instead of using the key from the ~/.ssh folder.

How can I make git use the ssh key from ~/.ssh?

Best Answer

Related Question