SourceTree known hosts


My scenario is the following - I'm testing SourceTree for Windows. I'm trying to add a git repository through SSH that is secured with Gerrit.

I have configured the correct keys using Pageant and tested them with the console - it works there.

However when I try to pull to update the local repository with SourceTree I can't get it working. First everytime I try this SourceTree says it doesn't know the server's key and if I want to store it - everytime I say Yes, yet the key is never stored. Besides the key is already in my known_hosts file in my user's home directory but apparently SourceTree doesn't look there.

Then I retry and get this error:

fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Any ideas how I can connect to the Gerrit managed repos?



4 answers

The problem with "Unable to authenticate [preauth]" is probably because terminal is using ssh and its configuration/keys, and SourceTree is using putty/plink. I had the same situation, and I solved the problem by converting openssh key to PuTTY format, starting plink manually, and loading the key. After that everything went smoothly. In my opinion SourceTree lacks transparency in that department.

Can you pull changes from the terminal successfully? This looks to me like a problem to do with your SSH keys as that error isn't generated by SourceTree. Regardless of whether you can or not it'll help narrow down the problem. Thanks!

As I said I tested the keys with the console(terminal) and it is working there. TortoiseGit and Egit are also working just fine with those keys.

It seems only SourceTree for Windows can't find them. I have correctly configured them in Pageant.

I'm trying to find out here how it is supposed to work and if it doesn't then I'll open a bug - that is expected because this version of source tree is still in beta.

Ah yes, could you file a bug? (Sorry, didn't see the Windows at the top!) It's labelled as SRCTREEWIN in Thanks very much!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,224 views 4 2
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