SourceTree Refusing to Load Bitbucket Repository

NOTE: I am very new to using SourceTree, Putty, Pageant, and Bitbucket. I am using SourceTree 1.5.1 on a Windows 7 operating system.

I've been at this for about 2 hours now, and after viewing several supposed answers, I get the same exact error each time. I'll walk you through the process that I'm doing.

1. I Open SourceTree.

2. This is where I encounter the first sign of problems. On everyone else's window, hovering over the "Tools" tab brings up several options, one being "Launch SSH Agent (Pageant)", but instead, I get "Launch SSH Agent..."

3. Clicking that option doesn't bring up an interface. It does, however, create a hidden icon. Left-clicking it doesn't do anything.

4. I go back to the "Tools" tab, and click on Create or Import SSH Keys. I generate a random key and get this screen. Nothing strange.

5. I save my public and private keys to the "C:/Users/Neil/.ssh" directory under the names of "ssh1_public" and "ssh1_private.ppk".

6. I then go to the repository that I'm testing this on, and copy the HTTPS repo link.

7. I then go back to SourceTree, click on "Clone / New", and paste in the link. I am then greeted with this message:

8. I click "Yes", then open up Pageant from the group of hidden icons, right-click it, then click on "Add key". I add my "ssh1_private.ppk" file.

9. I get the exact same message from before. Now if I click on "No", it brings up this message:

10. It then becomes a continuous loop of the exact same error messages.

Could someone please point out what I am doing wrong?

2 answers

1 accepted

0 votes
Accepted answer

I figured it out a while ago, and forgot about this post. When you generate the key using Putty, you need to copy the key that's in the Putty window right after it generates a new key (it will start with "ssh-rsa"), and paste that into Bitbucket's key-loading system.

Firstly, thanks for the detailed description of the problem.

There should be a step where you upload your public key to BitBucket. This will happen through Bitbucket's web interface, not through SourceTree.

Now I'm getting another problem. When SourceTree generates it's public and private keys (and I've tried this with SSH1, SSH2 RSA, and SSH2 DSA), BitBucket won't accept it as a valid SSH key. However, using Git Bash generates public and private keys that BitBucket will accept, but SourceTree won't.

Load your key in PuTTYgen and use "Conversions" > "Export OpenSSH Key..." to get a Linux-compatible SSH public key. This is a quirk of PuTTYgen, not SourceTree.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

212 views 3 7
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