Created
April 4, 2019 18:25
-
-
Save lucasdavila/1471b621762554835b78c48b4d480990 to your computer and use it in GitHub Desktop.
Using multiple ssh keys with git
This file contains hidden or 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
# This gist will help you using multiple github or bitbucket accounts in the same machine. | |
# 1. create a .ssh/config file, with this content: | |
# use "bitbucket-ieducativa" as git remote host, to use this custom key | |
Host bitbucket-ieducativa | |
HostName bitbucket.org | |
User git | |
IdentityFile ~/.ssh/bitbucket-ieducativa | |
IdentitiesOnly yes | |
# default key | |
Host bitbucket.org | |
User git | |
IdentityFile ~/.ssh/m4u | |
IdentitiesOnly yes | |
# 2. make sure the identity files exists (by creating ssk keys). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment