You can use ~/.ssh/config
as explained here:
https://confluence.atlassian.com/pages/viewpage.action?pageId=271943168
Host workdid
HostName bitbucket.org
IdentityFile ~/.ssh/workdid
Host personalid
HostName bitbucket.org
IdentityFile ~/.ssh/personalid
Otherwise, if you just want to "switch account" before doing the pushing, you can use ssh-add
. Open the Terminal.app
, run ssh-agent
and run ssh-add ~/.ssh/path_to_your_account_id_rsa
, then do the push.
After pushing, you can switch back to your default account by running: ssh-add ~/.ssh/id_rsa
.
Hope it helps!