How to setup Mercurial central repository on shared hosting

前端 未结 4 1016
孤街浪徒
孤街浪徒 2021-01-14 10:53

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

相关标签:
4条回答
  • 2021-01-14 11:27

    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/

    0 讨论(0)
  • 2021-01-14 11:39

    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.

    0 讨论(0)
  • 2021-01-14 11:48

    http://wiki.dreamhost.com/Mercurial

    This has worked for me in the past.

    0 讨论(0)
  • 2021-01-14 11:51

    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)

    0 讨论(0)
提交回复
热议问题