Friday June 01, 2007 ![]() |
JMX, SNMP, Java, etc...Daniel Fuchs blogs on JMX, SNMP, Java, etc... |
Today I have started experimenting using Mercurial (hg) with ssh. Here are the two first pitfalls in which I have fallen. As very well documented in the SSH section of the Distributed revision control with Mercurial, the first step is to set up your ssh configuration and make sure you can ssh to the server where the repository you want to access is located. The easiest way to check that this is working is simply to ssh to the server. If you manage to log in, then check that you have hg in your PATH: $ ssh server-host $ hg version $ ^D Then you need to check that everything still work in non interactive mode: $ ssh server-host hg version The first pitfall
When I tried the second command above ( dfuchs@server-host's password: remote: ksh: hg: not found abort: no suitable response from remote hg!
Since I had already verified that my A quick google search revealed that one way to fix this was to make
my I modified my PROFILE=yes;export PROFILE and my
case "z$PROFILE" in
z) # echo sourcing profile ;
. ~/.profile ;;
z*) # echo "profile already sourced"
;;
esac
Tried After reading my way through several internet searches and man pages such as man ssh man sshd man sshd_config man ksh I finally found a solution:
ENV=~/.kshrc This will make ssh export the $ ssh server-host hg version dfuchs@server-host's password: Mercurial Distributed SCM (version 0.9.3) Youpi!!! Update: On some systems, exporting The second pitfallI fell in the second pitfall when I tried to do an hg clone. If you want to specify an absolute path when specifying the remote workspace in hg clone ssh://server-host<workspace-path> then <workspace-path> must begin with //, otherwise it's interpreted to be local to your home dir. so hg clone ssh://server-host/export/hg/repos refers in fact to hg clone ssh://server-host//export/hg/repos refers to Well of course all of this might not happen if your server machine
has hg installed directly in Hope this help, Posted by dfuchs ( Jun 01 2007, 04:24:08 PM CEST ) Permalink Comments [4] |
Posted by Pedro on June 01, 2007 at 04:50 PM CEST #
Posted by daniel on June 01, 2007 at 05:29 PM CEST #
Thanks. The second pitfall was exactly my issue. I've been digging for mercurial documentation and could find this. Thanks again.
Posted by 63.72.182.34 on December 21, 2007 at 05:38 PM CET #
ssh://host//path/project needed for me as well, thanks. been searching for an hour.
Posted by 217.233.70.52 on November 07, 2009 at 01:43 PM CET #