all,
I have searched for this problem for long time and tried different methods.
I want to maintain my code on the server through only SSH. But when I run this:
sudo hg clone -v ssh://carl@hostname//home/carl/Java/Projects/peta/
Mercurial keeps telling me remote: abort: There is no Mercurial repository here (.hg not found)!
. Some articles said that the path should be correct and there should be a .hg
directory there. But I have checked it for several times and I am sure there is a .hg
folder at the right place.
I also tried
hg --config ui.remotecmd=/usr/bin/hg clone ssh://carl@hostname//home/carl/Java/Projects/peta/
But it failed as well. What other problem it could be? Thanks.
Solved
I finally fix the problem. Previously, I create a repository on my local machine, and scp all files (including .hg
) on to the server. I try to remove .hg
directory first, and create a repo on the server through ssh (hg init
). Then hg clone
works!