Skip to content

Instantly share code, notes, and snippets.

@nielsbrakel
Created November 29, 2021 09:58
Show Gist options
  • Save nielsbrakel/bc38bc41d269c9a731cecb7d25128636 to your computer and use it in GitHub Desktop.
Save nielsbrakel/bc38bc41d269c9a731cecb7d25128636 to your computer and use it in GitHub Desktop.
Configure SSH credentials to use with multiple hosts on Windows
# Work
Host bitbucket.org
HostName bitbucket.org
User git
IdentityFile C:/path/to/your/keyfile/bitbucket-key
IdentitiesOnly yes
# Personal
Host github.com
HostName github.com
User git
IdentityFile C:/path/to/your/keyfile/github-key
IdentitiesOnly yes
Host gitlab.com
HostName gitlab.com
User git
IdentityFile C:/path/to/your/keyfile/gitlab-key
IdentitiesOnly yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment