2

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. git@github.com: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!

chaimp
  • 16,897
  • 16
  • 53
  • 86

2 Answers2

1

Copy the SSH-URL (i.e. git@github.com: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.

  • Thanks, I guess that is the way to do it. What is the point of being able to select "Protocol" in the above dialog? – chaimp May 18 '16 at 18:35
  • Your Screenshot is from "Settings" > "Edit Account..." right? I quess you can choose your prefer protocol there for the Account. But I had to type in the SSH-URL after clicking on "Remote" and "Clone". Correct me if it's wrong. –  May 19 '16 at 11:46
  • For some reason, changing the "protocol" has no effect. But, manually entering the correct url works. Thanks. – chaimp May 19 '16 at 17:19
0

Not sure if this is useful but on Windows to default to SSH for remote clone from with-in SourceTree: Default to SSH for remote clone

Ricibob
  • 7,505
  • 5
  • 46
  • 65