SSH not working on SourceTree?

I have set up SourceTree to use SSH but it does not appear to be working.
Whenever I try to do a fetch from our remote repository, I get prompted for a username and password.
When I enter the correct username and password, this is what I get (in the space marked XXXX, SourceTree puts my ACTUAL PASSWORD):

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch --prune origin
Access denied
Access denied
Access denied
Access denied
FATAL ERROR: Server sent disconnect message
type 2 (protocol error):
"Too many authentication failures for XXXXXXXX"
fatal: The remote end hung up unexpectedly
Completed with errors, see above.

So not only does the SSH auth not work, I can't even use username/password auth. Does anybody have any ideas?

4 answers

1 accepted

This widget could not be displayed.

I was able to fix the problem by changing from "Putty/Plink" SSH to "OpenSSH" for the SSH provider. No idea why this helped, but it works now.

I had this problem for days and spent many hours on it.... And this solved it!!!! Do this!

 

Thanks

This widget could not be displayed.

Hi Tom,

This is very unusual behaviour. The error you're seeing which is showing your password is output from Git itself. Could you tell me more about your SSH setup? You've set up your id_rsa and id_rsa.pub keys in ~/.ssh/ and the URL for that repository has an SSH URL format? It looks like to me it's prompting for auth because it can't find any which could mean a number of things.

With further information we'll gladly be able to help.

Cheers

This widget could not be displayed.

I see the same problem when trying to use putty without keys (only username and password).

Please try with today's release (1.2.3), a couple of refinements have been added for URLs which don't include the user name and manual login is used.

This widget could not be displayed.

Works now, thanks!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

862 views 2 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