It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to configure Sourcetree to use Windows SSH

I'm using Sourcetree with system Git on windows with the windows OpenSSL feature enabled. I've created a ssh key successfully in the command prompt and added it to git. The commandline remembers my SSH passprhase and I can successfully clone a repository with SSH.

Now, when I run sourcetree it asks for the SSH passphrase, regardless of the ssh config in my global .gitconfig, which sourcetree should about I'm guessing.
My SSH client in sourcetree is set to OpenSSH and I have no SSH Key configured there.
My guess is that sourcetree is still trying to use the ssh in git as it tries to lauch the ssh agent (peagant) which aks for my passprase. Running git from the commandline never asks my passphrase as the Windows Credentials manager knows it and automatically enters it AFIK.

What do I need to change in sourcetree config to get this working?

I've got ` sshCommand = "C:/Windows/System32/OpenSSH/ssh.exe"` in the `.gitconfig` `[core]`-section.

Sourcetree 2.6.10.0

Microsoft Windows [Version 10.0.17134.285

Git 2.19.0

1 answer

I'm pretty sure sourcetree is still trying to use the Git SSH from my system git installation and that's the reason why it asks for the SSH passphrase all the time.

That means Sourcetree completely ignores the sshCommand entry in my global gitconfig. When I replace the ssh.exe and other ssh executables in the system Git folder with thosse of the Windows OpenSSL feature and start sourcetree again it doesn't complain about the SSH passphrase and I can push and pull successfully with SSH.

Based on this I'm pretty sure the problem is that Sourcetree ignores (part) of the global gitconfig and provides no method of specifying the sshCommand to use.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,917 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you