SourceTree "Authentication via SSH keys failed"

I followed the directions to setup SSH for Git and everything works perfectly up to there. I can connect to my BitBucket account (returns my username etc).

I then downloaded SourceTree and went to Tools > Create or Import SSH Keys, then Conversions > Import key > Save private key. After saving I open Pageant and try to clone one of the repos. This is when the error appears. I've tried everything to solve this with no luck.

Has anyone run into this problem and found a solution?

4 answers

1 accepted

Apparently the bug in the second answer still exists even though it states after 0.9.0.x it shouldn't. I manually added the key directly within Pageant and it works!

Thanks Jason

2 votes
Jesse Yowell Atlassian Team Nov 03, 2013

Chris,

You may try re-installing Pageant, found here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

All I had to do is restart Pageant

Did you verify that you have successfully added your private keys (*.ppk) in putty.

It was failing for my case as well. But once I have added explicitly it worked for me.

thanks man :-)

My suggestion is, install PuTTY yourself, instead of relying on the PuTTY agent that SourceTree installs. Not sure why, but it seems like the agent that SourceTree installs lacks a few features.

Once you install the new PuTTY agent, import the .ppk file that you generated (and saved). The file generated by the PuTTY installed by SourceTree uses the old PEM format. When you open the .ppk with the new PuTTY agent, it will ask you to (convert it) and save it as a .ppk recognised by PuTTY.

Enter the passphrase, and you're good to go. Import this new .ppk into Pageant, and you should be able to clone your repositories.

Hope this helps.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

29,191 views 26 12
Join discussion

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