Skip to content

Instantly share code, notes, and snippets.

@PedroCaicedoDev
Last active January 11, 2021 16:37
Show Gist options
  • Select an option

  • Save PedroCaicedoDev/e8cf9a86d5705faa2d927dcb88e3b6cd to your computer and use it in GitHub Desktop.

Select an option

Save PedroCaicedoDev/e8cf9a86d5705faa2d927dcb88e3b6cd to your computer and use it in GitHub Desktop.
Match Exec "[[ $(git config --get remote.origin.url)'' == 'git@github.com:user_or_company'* ]]"
IdentityFile ~/.ssh/id_rsa_github_company
IdentitiesOnly yes
Host github.com
IdentityFile ~/.ssh/id_rsa_github
IdentitiesOnly yes
ForwardAgent no
ForwardX11 no
ForwardX11Trusted no
Host ssh.dev.azure.com
User git
IdentityFile ~/.ssh/id_rsa_visualstudio
Host bitbucket.org
User git
IdentityFile ~/.ssh/id_rsa_bitbucket
# More info: https://stackoverflow.com/questions/7927750/specify-an-ssh-key-for-git-push-for-a-given-domain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment