How to solve problems when trying to clone a hg repository from Bitbucket?

After having used hg via different mechanisms for a while I just installed SourceTree. Basically it looks really great and easy to use. So I think it might be a great choice for new users to get started with hg or git.

Unfortunately I am experiencing problems when trying to clone a repository from Bitbucket. When I enter ssh://hg@bitbucket.org/<user>/<repository> as the URL I get "This is not a valid source path / URL". Clicking on details shows "remote: The command "C:\Program" is either written wrong or could not be found" (or so, my own translation as this is a non-English Windows).

Now things get rather strange to me: I cloned the repository on the command line (via ssh) and opened it with SourceTree . After that I did the first edit and could commit and push without problems. And this is using the same URL as shown above internally.

So I wonder if there's something wrong with my setup or if it's actually a software issue.

1 answer

1 accepted

0 votes
Accepted answer

I literally just spotted a bug that sneaked through that would only show up when SourceTree was installed in its final location, in C:\Program Files... - it's down to improper handling of spaces in that path just for the initial probe of the remote.

Sorry about that, I've fixed it and I'll post another update shortly. In the mean time you can either clone via HTTPS instead or clone on the command line and pull in the repo by dragging/dropping from Explorer into the Bookmarks pane on the left.

Sorry about that!

Thanks a lot for the prompt reply! Currently I'm fine with cloning on the command line as this works fine with me. And for me it's good to hear that the default ssh setup on Windows normally just works right away.

Yeah, ssh is what I use all the time, I just didn't spot the issue with the spaces in the path because my test versions sit in space-free path names. It only affected the initial probe, the clone itself would have worked (if you could have got to the Clone button!). Update coming very soon.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

837 views 3 2
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