I am trying to setup a central repository with shared hosting. I read all the way through this tutorial https://www.mercurial-scm.org/wiki/PublishingRepositories to no avail
I had the same problem. I needed to set up a Mercurial server on a shared host to which I do not have root/shell access. I followed this guide and with surprisingly little frustration, got it to work: http://javadocs.wordpress.com/2010/04/27/set-up-mercurial-1-5-1-on-a-shared-host-simplified/
If the .cgi extension isn't already mapped to the cgi handler in your host's Apache config you either need a ScriptAlias or AddHandler line for your hgwebdir.cgi script. Actually you can get rid of all that unnecessary RewriteCond and RewriteRule stuff if you just do a single ScriptAlias:
ScriptAlias /hg /home/username/central_repository/hgwebdir.cgi
Also the repo has a /home/user/central_repository/projectname/.hg directory, right? Putting the contents of the .hg directly into projectname would be wrong.
Lastly, try visiting it with your browser, not using clone. What do you see at http://ggap.sf.net/hg/ ? What is in the apache access and error logs? Hopefully you have access to the error log because that always has the best output for debugging this stuff.
http://wiki.dreamhost.com/Mercurial
This has worked for me in the past.
This could also be a permission error.
I just encountered a similar situation where I had created a repository in my usual place where apache picks it up via hgwebcgi. I could clone that repository locally (not going via webserver), but not from a remote client, so I knew it was not a hg error as such.
Turned out the problem was that my repository was owned by the user I created it with, with no read/write access given to apache.
Running
chown -R apache:apache <repo>
did the trick. (I exclusive access these repositories via the web, so this seems ok, otherwise come up with a solution that will allow apache access without owning it)