I am using SourceTree on Mac. I have a remote helper set up that allows my native Git client to connect to a Mercurial repository. When I attempt to clone my Hg repo with a URL like 'hg::<url>', SourceTree reports that Git cannot find a remote helper. I have SourceTree set up to use my native Git client, and my Git client can clone from the command line.
Can you suggest how I can make this work with SourceTree?
I'm guessing you've made some changes to your PATH or other environment settings in your terminal in order to make the remote helper work there. On the Mac, changes to the terminal's environment are not visible to full OS X apps, because they are launched by a service called 'launchd' and not via sh/bash where you would have made your environment changes.
You can tackle this 2 ways:
@Steve, I've made sure that git-remote-hg is in the path (symlinked it to /usr/local/bin, which is part of /etc/paths by default) and am able to use it from the terminal by issuing:
# git fetch origin
# git remote -v origin hg::/path/to/origin (fetch) origin hg::/path/to/origin (push)
When I launch SourceTree and try to fetch from that remote in the GUI, I get:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin fatal: Unable to find remote helper for 'hg' Completed with errors, see above
Any idea why this might not be working? I didn't add the path to /etc/paths.d as it'd be redundant there and I haven't yet tried modifying launchd.conf.
I'm running system git version 184.108.40.206 installed via homebrew under /usr/local.
It's important to note that SourceTree runs in its own environment entirely, and thus has its own PATH env var. If you've set up a remote helper for your repository and that helper is located on your PATH env var ('echo $PATH' on the terminal) then it won't be available from SourceTree.
This is just the way Mac apps work unfortunately.
That's what @Steve had noted in his answer, but he also gave a few suggestions on how to ensure that the helper appears in SourceTree's PATH. This is somehow not working for me, so maybe I'm misunderstanding his answer.
If I can't control what's in SourceTree's PATH, maybe I can just symlink git-remote-hg to a folder already accesible to it. What's its default PATH?
Hi awesome community! In this article, I would like to describe the one of the toolset (service) for the analyze some problems on different Java-based instances, of course, as Atlassian admini...
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