Setting a custom path for git private SSH key on linux

后端 未结 5 1441
春和景丽
春和景丽 2021-01-30 17:19

I\'m trying to setup a git client on linux. I uploaded my private key to the machine, and I understand that I should put it in ~/.ssh, but I don\'t have access to that folder.

5条回答
  •  天涯浪人
    2021-01-30 17:38

    One option is to use ssh-agent and provide a file name to ssh-add.

    For example:

    $ ssh-agent /bin/bash
    $ ssh-add ~/mykeys/id_rsa
    

提交回复
热议问题