Preamble
Basically, I followed the recommendations in this other tread.
The situation
I have in my ~/.ssh/ two keys. id_dsa_git (the one I use for github) and id_rsa.
So, when I try to connect to Github, git still use id_rsa instead of id_dsa_git
My configuration
In my ~/.ssh/config I have the following configuration:
Host github
HostName github.com
User git
IdentityFile ~/.ssh/id_dsa_git
AddKeysToAgent yes
PubKeyAuthentication yes
And the relevant files have the needed rights:
.rw------- 824 fauve 27 juil. 15:24 /home/fauve/.ssh/config
.r-------- 672 fauve 6 mars 2022 /home/fauve/.ssh/id_dsa_git
The problem
But, git still give me id_rsa:
git clone git@github.com:torvalds/linux.git
Cloning into 'linux'...
Warning: the ECDSA host key for 'github.com' differs from the key for the IP address '140.82.121.3'
Offending key for IP in /home/fauve/.ssh/known_hosts:57
Matching host key in /home/fauve/.ssh/known_hosts:76
Are you sure you want to continue connecting (yes/no)? yes
Enter passphrase for key '/home/fauve/.ssh/id_rsa':
The question
How to force git to use id_dsa_git instead of id_rsa ?