I'm having trouble trying to get this work even though there's ton of questions on this topic. Either I'm missing something or they're not what I want.
I have two accounts on github - account1
and account2
with their respective repositories
git@bitbucket.org:account1/repo.git
git@bitbucket.org:account2/repo.git
On my PC I've created 2 separate SSH keys for each one account1_id_rsa
and account1_id_rsa
They both individually work when I name them just id_rsa
and by default it all works. But I want to be able to keep they keys named account1_id_rsa
and account1_id_rsa
and still be able to push/pull without having to rename each one depending on which repo I wanna work on at the moment.
After reading many QAs on the topic, I still can't figure out what to put in my .ssh\config
. So far I've tried
Host bitbucket
HostName bitbucket.org
IdentityFile ~/.ssh/account2_id_rsa
User account2
Host bitbucket
HostName bitbucket.org
IdentityFile ~/.ssh/account1_id_rsa
User account1