Setting a custom path for git private SSH key on linux

后端 未结 5 1437
春和景丽
春和景丽 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:58

    Use ssh-agent

    ssh-agent bash -c 'ssh-add /home/me/my_private_key; git clone git@bitbucket.org:uname/test-git-repo.git'
    

提交回复
热议问题