views:

239

answers:

2

I'm trying to install mercurial-server, but getting such errors...

$ hg clone ssh://hg@<domain>/hgadmin
remote: mercurial-server: no such repository hgadmin
abort: no suitable response from remote hg!

I've just added my public key to keys/root and refreshed auth..

Anyone know what's the problem?

A: 

Are you sure your clone command syntax is correct? I see at least two errors in it:

  1. You must put the repo you're cloning (not just the destination)
  2. Just as for push, you must use two slashes before hgadmin:

Example FAILING (missing the source repo and using only one '/' before 'home')

 $ hg clone ssh://[email protected]/home/John/delme

Example FAILING (missing the source repo)

 $ hg clone . ssh://[email protected]/home/John/delme

Example SUCCEEDING:

 $ hg clone . ssh://[email protected]//home/John/delme
Webinator
+1  A: 

I had this same problem and for me it was a problem with the installation of the hgadmin repository. When I installed the package, I got errors from python saying the mercurial package wasn't installed. I assume that happened when mercurial-server tried to initialize the hgadmin repository. So when I went to checkout the hgadmin respistory, there was no .hg directory:

root@myshost:/var/lib/mercurial-server/repos# cd hgadmin/
root@myshost:/var/lib/mercurial-server/repos/hgadmin# ls -a
.  ..

In order to resolve this, I did:

easy_install mercurial
sudo apt-get purge mercurial-server
sudo rm -rf /var/lib/mercurial-server
sudo apt-get install mercurial-server

And then continued on with the directions here:

http://kurtgrandis.com/blog/2010/03/20/gitosis-for-mercurial/

Randy Syring