SourceTree gives authentication error but never prompts for password

Joshua Vanderberg April 5, 2013

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

ssh://unixuser@ipaddress/home/unixuser/git/flex

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
Joshua Vanderberg April 5, 2013

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.

stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 7, 2013

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 https://jira.atlassian.com/browse/SRCTREEWIN-424. 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)

0 votes
MikeL April 5, 2013

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
TAGS
AUG Leaders

Atlassian Community Events