Git and SSH, which key is used?

后端 未结 7 1939
暗喜
暗喜 2021-01-29 23:57

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?

7条回答
  •  醉酒成梦
    2021-01-30 00:36

    Unless it is specified on the .ssh/config it will use the default private key file.

    The default file is ~/.ssh/id_rsa or ~/.ssh/id_dsa or ~/.ssh/identity depending on the protocol version.

提交回复
热议问题