Created
April 21, 2014 18:54
-
-
Save oafridi/11152606 to your computer and use it in GitHub Desktop.
Multiple git ssh keys for two bitbucket accounts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workid and personalid: | |
1. Edit the ~/.ssh/config file | |
Add an alias for each identity combination for example: | |
Host workid | |
HostName bitbucket.org | |
IdentityFile ~/.ssh/workdid | |
Host personalid | |
HostName bitbucket.org | |
IdentityFile ~/.ssh/personalid | |
2. substitute in the alias i.e git@bitbucket.org:accountname/reponame.git - git@alias:accountname/reponame.git | |
3. add key to bitbucket via web UI | |
4. Make sure ssh-agent is running and loaded keys: | |
ssh-add -l | |
ssh-add ~/.ssh/workid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for putting this up. It was super helpful.