JAM JAM - 1 year ago 104
Git Question

GIT and SSH, which key is used?

Say your

directory contains 30 keys (15 private and 15 public)

Where in
, can one check which one is used to connect to a given remote repo?

Answer Source

The following entry in .ssh/config file solves the problem

  host git.assembla.com
  user git
  identityfile ~/.ssh/whatever

Where ~/.ssh/whatever is a path to your private key

Additionally, user and host can be picked up from

git push git@git.assembla.com:repo_name.git
         ^__ ^_______________
         user host
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download