I am trying to setup my git config to choose the ssh that corresponds to each case
Host github.com_enterprise
Hostname github.com
User user_enterprise@enterprise.com
IdentityFile ~/.ssh/id_enterprise_ssh
Host github.com_personal
Hostname github.com
User user_personal@personal.com
IdentityFile ~/.ssh/id_personal_ssh
or
Host github.com:enterprise
Hostname github.com
User user_enterprise@enterprise.com
IdentityFile ~/.ssh/id_enterprise_ssh
Host github.com:personal
Hostname github.com
User user_personal@personal.com
IdentityFile ~/.ssh/id_personal_ssh
I have found that the host was supposed to be the alias but it doesn't work. For example, if want to make git clone works with id_enterprise_ssh what I have to do is
Host github.com
Hostname github.com
User user_enterprise@enterprise.com
IdentityFile ~/.ssh/id_enterprise_ssh
I have to edit the host by deleting the _enterprise and deleting the other github.com_personal information. So, I wonder what I am missing in my config setup