I'm using SourceTree, the stable release launched yesterday, on my Windows 7 laptop.
I generated the SSH keys using the Putty Key Generator in SourceTree, and saved them to my disk using the "Save public key" and "Save private key" options, as shown below:
Then I closed the window, and tried to import the private *.ppk key from Tools > Launch SSH Agent (Pageant) and selecting the private file. That's where the problem is. It doesn't accept the private key file:
That's the error I get. I am not sure why it's unable to open the private key file. Any idea as to what I could be doing wrong here?
Edit: Turns out the problem was saving the ppk in a path which had a space in it, and SourceTree wasn't coping with that properly when launching Pageant. This will be fixed in 0.9.0.2.
Old answer: That looks like entirely the correct process to me. I just repeated this process here and the .ppk I saved loaded back just fine. Are you sure you saved the *private* key as the .ppk? I usually call my public keys '.pub' to differentiate them from the .ppk files, the public keys are just plain text.
Okay, I've tried reinstalling SourceTree to no avail. But I've found a temporary fix, which I've added as an answer. Please take a look. Does that say something? I've no idea why this is happening, or how to fix it. Hope you can find something. Looks like I should stick to github for windows for now.
I have tried to load the key from my previously generated ppk file under TortoiseGit's putty keygen. I notice that SourceTree's Pageant cannot locate the ppk file if it is saved to TortoiseGit's directory in C:\"Program Files" or directly under C:\. Well, the file is actually unable to be located using "Computer" or command line (run as myself or administrator). But it is ok if I save the key under my Documents directory.
UPDATE: Apparently it's a bug. See Steve Streeting's answer.
I'd consider the error a bug, but what do I know. Anyway, I finally got it to work, and here are my findings.
Undo what you did:
After MUCH stuffing around, I finally got Sourcetree on Windows to work. I'm using version 184.108.40.206.
It would just hang when I put in an SSH URL while trying to verify if it was a git repo. The problem was that putty had not accepted the remote host key.
The fix: try logging into the remote host using putty itself. The log-in will probably fail (depending on how SSH is set up on the remote server), but you will get the opportunity to save the host key.
Thereafter SourceTree will actually work with the SSH URL.
It doesn't work at all on my machine. Got a fresh installation of SourceTree and I'm not able to clone a repository from Bitbucket at all. Don't even get an error message in the GUI. If I start the git bash (not by pressing Terminal as it doesn't work as long as you don't have a local repository, but from the containing folder) it's reporting an authentication error. Really need my SourceTree but can't fix it somehow
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
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...
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!
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