We installed Mercurial on the server which we use to synchronize developer’s local repositories. We use stand alone mercurial web server (hg serve), what we want is to grant access to the web server only to the authorized users, right now it is accessible to all.
Is there any way to configure authorization for Mercurial stand alone web server?
In the configuration file (hgrc) there is a section called [auth] where a list of users can be defined, but it seems it is used for something else, not for web server.
hg serveallows you to set up authorization rules in[auth], but doesn’t handle authentication on its own. It should be provided by a web server.You have at least these two options for authentication handling:
hg servebehind nginx.Edit. Here’s an excerpt from my nginx config file (requests auth for both read and write):