Context: I use multiple accounts with the same host in my SSH config file, so I use aliases. From Best way to use multiple SSH private keys on one client
From .ssh/config
:
# Company account
Host company
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_company
# Personal account
Host personal
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_personal
And I have started using VS Code Remote Development which shares ssh credentials with the host.
Problem:
When I try to use git on the remote container, it doesn't resolve the host since it's not importing the ssh configuration file, it's only importing the .gitconfig
file.
Thank you very much,