Created
November 13, 2020 06:17
-
-
Save Rfrixy/b67280bd2c39fd1cf53618b2be3fabde to your computer and use it in GitHub Desktop.
SSH config -- forward ssh agent and have multiple identities
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
# Forward agent | |
Host * | |
ForwardAgent yes | |
AddKeysToAgent yes | |
IdentityFile ~/.ssh/id_rsa | |
# Multiple identities you will need to add '-personal' yourself to the repository url when cloning | |
Host gitlab.com | |
HostName gitlab.com | |
User git | |
IdentityFile ~/.ssh/id_rsa | |
IdentitiesOnly yes | |
Host gitlab.com-personal | |
HostName gitlab.com | |
User git | |
IdentityFile ~/.ssh/personal_rsa | |
IdentitiesOnly yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment