I have been searching, but I couldn't find a tutorial with a step by step guide to creating authentication for Mercurial. From what I have found, a lot of people are pointing to this resource, but it doesn't seem to show what I am trying to achieve: http://mercurial.selenic.com/wiki/PublishingRepositories
Can someone please show me where I can find a guide to setup authentication with Mercurial? HTTPS, or public key system, they both work!
Thank you
The page you've found has the information for HTTP, it's in section 6.3: Adding authentication. You need to configure Apache to do Basic authentication for requests to
hgwebdir.cgi
, that's all.Just remember that Mercurial does not authenticate HTTP users. It's the job of the front-end webserver, such as Apache. That has the advantage that you can re-use your existing infrastructure for authentication: if you've already got a setup where Apache uses LDAP for Active Directory authentication, then Mercurial will inherit that.
For SSH you can look in the Hg Book and the Shared SSH and Multiple Committers wiki pages. Here you must remember that access control boils down to normal file system permissions once the user has been logged into the server.
Finally, I wrote a guide about interacting with remote repositories that might contain a hint or two that you can use.