-
Type:
Suggestion
-
Resolution: Unresolved
-
None
-
Component/s: None
-
None
Sourcetree currently cannot connect to an already running ssh-agent, it always starts its own ssh-agent.
If e.g. your Bitbucket Server is behind another host and you connect to it with SSH, you need to use a proxy jump host like this:
Host bitbucket.company.domain
User git
ProxyJump sshproxy.company.domain
IdentityFile ~/.ssh/bitbucket
Host sshproxy.company.domain
User USERNAME
IdentityFile ~/.ssh/id_rsa
This works really well with GNU/Linux and with Windows using OpenSSH. For key management however we use PuTTY and pageant on Windows. Git comes with a ssh-pageant.exe and a start-ssh-pageant.bat script to launch the ssh-pageant.exe which talks OpenSSH to git but fetches the keys from PuTTY's pageant.
This works perfectly with TortoiseGit and Git for Windows, but it fails with Sourcetree because Sourcetree insists in launching its own ssh-agent instead of using the one already running.
Sourcetree should respect an already running ssh-agent/ssh-pageant and use the respective SSH_AUTH_* variables to connect to it.