Sourcetree cannot connect to stash - Could not establish trust relationship error.

I get the following error when I try to connect sourcetree to the stash server at workplace.

I am already configured for bitbucket and github projects, except stash has ( I am guessing here ) an unsigned certificate that seems to be causing problems.

I have tried to resolve this in a few ways. I first believed the solution would be like 1. exporting the stash website certificate from firefox and 2. converting it to PEM and 3. adding this line to .git:


... But this had no effect, same pop-up indicating a trust relationship error. Would anybody have an idea on how I can solve this?


(Screenshot of error below)

2 answers

I tried to resolve by appending our self-signed certificate to C:/Users/$USERNAME/AppData/Local/Atlassian/SourceTree/git_local/bin/curl-ca-bundle.crt

I got past "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel" error by having IE install the self-signed certificate to the Trusted Root Certification Authorities store.

I still have the "fatal: unable to access '' ..." error

This was driving me nuts, but I finally found the setting in the SourceTree.exe.config file

        <setting name="SourceTreeHomeWebSite" serializeAs="String">
        <setting name="ReleaseNotesRelativeUrl" serializeAs="String">

************* Set the value to true :)
<setting name="AllowUncertifiedSSLRequests" serializeAs="String"> <value>True</value> </setting>
        <setting name="IsPortable" serializeAs="String">



Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

234 views 0 3
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot