Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a shared hosting account with SSH access. I have set up a virtual Python installation and have copies of the system folders in $HOME: ~/bin, ~/lib ...

I have installed mercurial through easy_install and everything is groovy: The hg executable sits at ~/bin/hg and my $PATH knows of this. I can create and commit to repositories fine on the server.

However, when I try to clone my repo to my laptop via SSH I get an error that hg can't be found.

$ hg clone ssh://myuser@server/hg/foobar
remote: jailshell: hg: command not found
abort: no suitable response from remote hg!

How to I tell mercurial (or SSH or jailshell) where to look for the executable?

share|improve this question
up vote 3 down vote accepted

You can tell Mercurial where exactly the hg command is on the remote machine by using the --remotecmd option to hg clone. See hg help clone.

You can also set it in your ~/.hgrc or the .hg/hgrc of a specific repo clone. I think it belongs in the [ui] section.

share|improve this answer
in .hg/hgrc: [ui] remotecmd = /home/username/bin/hg – Leonard Ehrenfried Feb 26 '10 at 13:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.