JAM JAM - 2 months ago 6
Git Question

GIT and SSH, which key is used?

Say your

.ssh
directory contains 30 keys (15 private and 15 public)

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

JAM JAM
Answer

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
Comments