SourceTree on Windows: How to connect to SSH?

前端 未结 4 945
一生所求
一生所求 2021-02-01 03:44

I have an SSH access to my web hosting, it works great with PuTTY (I just had to enter my domain, username and password), however it seems much more complicated with SourceTree.

4条回答
  •  北恋
    北恋 (楼主)
    2021-02-01 04:26

    I had to do some additional work from Patoshi's answer.

    In Tools > Options > General > SSH Client Configuration, I had to point it to the id_rsa key, and select OpenSSH as the SSH Client (Putty/PLink is selected by default).

    Then each time you start SourceTree, a prompt will appear asking for the passphrase to decrypt the id_rsa key (assuming you created it with a passphrase to encrypt it). This looks like so:

    At that point, I could go to the Clone page, paste in the SSH address from my Gitlab project (git@localgit.local:Blah/Whatever.git) and it cloned it. No extra prompts for username or password (since it is using SSH keys).

提交回复
热议问题