Software Projects

Using an SSH config file to git-push to use the right SSH key for multiple domains

Posted in Uncategorized by rmtheis on August 27, 2012

Use a file called config in your .ssh directory to direct ssh/git to use the correct ssh public key, depending on which domain you connect to.

An example that uses the correct SSH key when using git push to save code to either GitHub or Heroku:

  IdentityFile C:\Users\Robert\Documents\keystore\github-id_rsa
  IdentityFile C:\Users\Robert\Documents\keystore\heroku-pc2-id_rsa

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s