Bitbucket different keys and accounts
I mean, if I’m going to work with
*.bitbucket:user1 ssh should use key
id_rsa.user1 and for
*.bitbucket:user2 should user
Have tried it by doing:
IdentityFile ~/.ssh/id_rsa.user1 IdentityFile ~/.ssh/id_rsa.user2 Host *.bitbucket.org:user1* IdentityFile ~/.ssh/id_rsa.user1 User git Host *.bitbucket.org:user2* IdentityFile ~/.ssh/id_rsa.user2 User git
But no luck.
One Solution collect form web for “Bitbucket different keys and accounts”
With ssh, you can easily name your ssh remote in order to use one set of key or the other, using
(this works for BitBucket or GitHub)
See as an example “change github account mac command line”
#User 1 on BitBucket Host bitbucketu1 HostName bitbucket.org User git IdentityFile ~/.ssh/id_rsa.user1 #User 2 on BitBucket Host bitbucketu2 HostName bitbucket.org User git IdentityFile ~/.ssh/id_rsa.user2
git clone bitbucketu1:repo1 would clone a repo from user1.