SSH Authentication Failed (SourceTree Windows) - Should I set SSH agent to PuTTY? Edited

When fetching from a remote, I'm getting the "SSH Authentication Failed" window. ("The OpenSSH agent is running but the server still rejected your connection. […]")

  • I had created a new, 2048-bit key using PuttyGen and added the public key to the server.
  • I can confirm that it works in the Git terminal. The following logs me in without manual intervention:
eval $(ssh-agent)

ssh-add C:\\Users\\MYUSER\\.ssh\\dell-no-passphrase-openssh-2048-bits

  • SourceTree is using OpenSSH and System Git. (System Git 2.15.0/LibGit2Sharp 0.24.0 + git-lfs v2.3.4)
  • I did try Tools > Launch SSH Agent.
  • The SourceTree SSH Key option field contains:
C:\Users\MYUSER\.ssh\id_rsa;C:\Users\MYUSER\.ssh\dell-no-passphrase-openssh-2048-bits;D:\MYUSER\Documents\MYUSER-DELL (OpenSSH).ppk

I do see the difference in backslashes between SourceTree's setting and the terminal's add-ssh, but wouldn't one assume that SourceTree would deal with any issues when passing key filenames to its SSH agent? What's wrong here?

Or should I just tell SourceTree to use PuTTY? (I have Pageant running 24/7.) If so, why do other instructions recommend using OpenSSH instead of PuTTY?

Thanks for your help.

1 answer

0 votes

Hi! Seems like there's a bug around that. There were a couple threads in Community where users proposed their solutions, you can find them at:

Let us know if that helps you! 

Best regards,


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 ...

248 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