Can you give some pointers to setup Mercurial over HTTP/HTTPS?
I am setting up a development server (Debian), where i want to create a mercurial repository and push the changes to the server. I need to authenticate to prevent any unnecessary access.
Thanks in advance.
Best Answer
I think Apache is a great way of sharing hg repositories. Not only does the hgweb.wsgi script give one the possibility of running multiple repositories, but it allows developers to conveniently cross-reference the project source code by path or revision from a definitive source.
The following procedure will give an easy way of publishing a repository, and making it available over an https web connection to authenticated users.
First of all I suggest making a clone of your repo without a local file directory.
Next (using the WSGI configuration which is nice an easy), do the following:
Move your repo to a convenient place from which to serve it:
Make sure that the repo is read/writable by the web server user:
Now setup read/write rights for users of the project, and provide some information for the project listing on your server's home page:
Now setup WSGI
Now setup apache
The above requires you to have:
Surfing to
hg.mydomain.net
will show you a nicely formatted list of available projects.hg.mydomain.net/myproj
will show you, after successful authentication, the current status of your project as per the/var/www/hg/<myproject_to_serve>
repo.