SourceTree gives authentication error but never prompts for password

I host my own repository at a URL of the form:


The IP address in the 10. range, as we VPN into the remote network.

My working copy in my local user directory in windows.

I can use SourceTree just fine if I stick to actions on the local working copy, but any attempt to pull or push results in:

"fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists."

The thing is, that I am never even prompted for a password. I am assuming it's using the "unixuser" from the URL. It has never prompted me for a password.

I also get the same error if I attempt to clone the repository to a new local working copy.

EGit functions perfectly using the exact same working copy. I can pull and push just fine. EGit prompted me for my password the first time, and then saved it.

In SourceTree I've looked in Tools | Options | Authentication, and there are no user id's or passwords stored there, and no option to add one.

I've attempted to add/convert the ssh key I use in cygwin for remote passwordless access to the same host, and nothing I've done so far appears to work. The ssh key setup appears to be generic, and doesn't really seem to reference a particular repository.

I've also clicked the "terminal" button to launch a terminal, and then added a .ssh/id_rsa and .ssh/id_pud.rsa, and was successfully able to pull from the remote from the command line. But for whatever reason the GUI tool doesn't appear to recognize this setup.

2 answers

1 accepted

0 votes
Answer accepted

I discovered that I had successfully imported the ssh key, but had not launched the "SSH Agent". Perhaps this action should be included in authentication error messages "ssh chosen, but SSH Agent not running, launch now?"

I would still like to know why I wasn't prompted for a password though. The tool should be able to ssh in without a ssh key, though perhaps that requires the SSH Agent as well.

Though your online documentation does mention all of the correct steps, it would be nice if it SSH agent were more intuitively integrated into the SourceTree, with something to let you know what it is and when/why you should start it.

Yes SSH login is only supported via PuTTY keys right now and not manual passwords (this is also the only supported SSH mechanism in Bitbucket and GitHub). This is logged at Support for OpenSSH may be added in future, we chose PuTTY because it's Windows-native and you can import OpenSSH keys (the reverse isn't the case)

smartGit also asks for your password/private key+passphrase. IMHO sourcetree also should be that smart.

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,233 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