Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

sshCommand does not work since 4.2.1 version

Alexander Dmitriev
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 12, 2023

Hi guys,

I have a following config for gitlab repo with team ssh key

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
sshCommand = ssh -i ~/.ssh/id_team_rsa -o IdentitiesOnly=yes -F /dev/null

After update Sourcetree to version 4.2.2 or higher I have the auth error

Screenshot 2023-10-12 at 10.56.02.png

Version 4.2.1 works pretty well when I rolled it back. Also, the command works in terminal as well

Why it doesn't work for higher version? Are there changes which I didn't find?

Thanks

1 answer

0 votes
Martin Runge
Community Champion
July 8, 2026

Hi @Alexander Dmitriev

Welcome to the Atlassian community.

The fix is to switch Sourcetree to Tools > Options > SSH Client and set it to OpenSSH instead of PuTTY/Pageant. This was changed around version 4.2.2, causing core.sshCommand to be ignored.

Alternatively, define the key in ~/.ssh/config directly, which works regardless of Sourcetree's SSH client setting:

Host gitlab.yourcompany.com
IdentityFile ~/.ssh/id_team_rsa
IdentitiesOnly yes

Cheers, Martin

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events