Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save leonvisscher/a975bf444ac46180465f0fd18d3a7866 to your computer and use it in GitHub Desktop.
Save leonvisscher/a975bf444ac46180465f0fd18d3a7866 to your computer and use it in GitHub Desktop.
Multiple git repos with deploy key SSH config
# ~/.ssh/config
Host alias-repo-1 github.com
Hostname github.com
IdentityFile ~/.ssh/keyfile1
Host alias-repo-2 github.com
Hostname github.com
IdentityFile ~/.ssh/keyfile2
# Git clone commands
git clone git@alias-repo-1:user/repo1.git
git clone git@alias-repo-2:user/repo2.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment