Git and SSH, which key is used?

git, ssh

Solution

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

Problem

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 repository?

Original source

Related problems