Git and SSH, which key is used?

后端 未结 7 1932
暗喜
暗喜 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:28

    This might be super edge, but after running ssh -vT git@github.com it showed me it was checking /root/.ssh for the keys, I was expecting it to check my home directory and then I realized I was logged in as root!

提交回复
热议问题