Tell git which private key to use
- by jrdioko
ssh has the -i option to tell it which private key file to use when authenticating:
-i identity_file
Selects a file from which the identity (private key) for RSA or DSA
authentication is read. The default is ~/.ssh/identity for protocol ver-
sion 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol version 2. Iden-
tity files may also be specified on a per-host basis in the configuration
file. It is possible to have multiple -i options (and multiple identities
specified in configuration files).
Is there a similar way to tell git which private key file to use when on a system with multiple private keys in the .ssh directory?