Search code examples
gitgithubatlassian-sourcetreesourcetree

How can I set Sourcetree to use ssh paths by default when cloning a remote repo?


When I clone a remote repository in SourceTree from github, it automatically uses an HTTP path. This means that any time I want to push/pull, I need to enter a password. I would like to use the ssh path (i.e. [email protected]:username/repo.git).

I noticed that there is an option to select "Protocol" when entering the remote account information. However, changing the value (and even recreating the account) appears to have no affect.

enter image description here

Please advise on the best way to force SourceTree to use the ssh path.

Thanks!


Solution

  • Copy the SSH-URL (i.e. [email protected]:username/repo.git).

    Go to the Bitbucket application: Click on "New Repository" -> "Clone from URL" -> Enter the SSH-URL, choose Destination Path and Name. I think its the easiest way.