We have apache server which serves a site from public_html/site/ We would like to have a mercurial repo in the same dir, so that we could push our changes directly to the server.
So far I setup a hgweb.wsgi script and I can push and pull from the repo without any problems.
Problems start when I want to add an authentication. Both read and write access to the repo should be forbidden for unauthorized users. Mercurial help mentions using HTTP auth, well, I can create .htaccess with .htpasswd, and place them in public_html/site/, but that would make the website not accessible.
Please help.
Update (solution): Perhaps the virtual hosts solution could work too, but I found a simpler one. You do not have to place authentication in the site dir, you have to place it where your hgweb script resides. Then just forbid access to .hg dir in the site dir and that's it!
Now pulling and pushing works through hgweb script only, with authentication.