Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloning a Mercurial repository over SSH

I'm having some difficulty cloning my mercurial repository over ssh.

Here's what I have tried:

hg clone ssh://[email protected]/path/to/projectname projectname

It's giving me this error:

remote: bash: hg: command not found
abort: no suitable response from remote hg!

hg is installed on the server, however.

I was trying to follow the instructions on this website.

like image 895
Josh Avatar asked Dec 13 '10 17:12

Josh


3 Answers

You need a double // after hostname i.e.:

hg clone ssh://[email protected]//path/to/projectname projectname 
like image 196
anteatersa Avatar answered Sep 21 '22 19:09

anteatersa


Sounds like hg is not on your path. The Mercurial FAQ mentions possible fixes for this issue: FAQ/CommonProblems.

Add the remotecmd value to your Mercurial configuration by opening ~/.hgrc (or Mercurial.ini on Windows) on your client machine and adding the following:

[ui]
remotecmd = /path/to/hg

where /path/to/hg is the path to the hg command on the remote server.

If you're having problems with your Mercurial configuration, you can use the hg showconfig --debug command to obtain a full list of your Mercurial settings along with the path and line number of the configuration file that defines each configuration value.

like image 36
Richard Cook Avatar answered Sep 24 '22 19:09

Richard Cook


Looks like mercurial isn't in your user's PATH on the remote server.

like image 42
OneOfOne Avatar answered Sep 24 '22 19:09

OneOfOne