Last active
March 18, 2020 03:17
-
-
Save daevski/546ba54c7563a26ea49a7a845d517f11 to your computer and use it in GitHub Desktop.
An example ssh config file using multiple accounts for the same domain.
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
# Comments: | |
# This config file allows for the dynamic selection of ssh keys based on the domain name matching the 'Host' line. | |
# | |
# The following examples are the urls configured within git remotes (`git remote -v`) | |
# Example using domain 'github_personal' : git@github_personal:daevski/Project.git | |
# Example using domain 'github_work' : git@github_work:Organization/Project.git | |
Host github_work | |
HostName github.com | |
User git | |
IdentityFile /c/Users/daevski/.ssh/github-work | |
IdentitiesOnly yes | |
Host github_personal | |
HostName github.com | |
User git | |
IdentityFile /c/Users/daevski/.ssh/github | |
IdentitiesOnly yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment