Search code examples
mercurialdvcswindows-authenticationtortoisehg

How to enable authentication for Mercurial push/pull operation while using TortoiseHg?


I'm using Mercurial as the VCS in my development team, and the TortoiseHg is used as the GUI tool. Due to the work flow change, our QA members would like to have finer control over the push/pull operation on the release server, they'd like to allow only specified user(s) with user credential(s) to access to specified repo(s). Please advise how to achieve this in both the pull and push operations? as well, please advise if it is possible to incorporate with the Windows Authentication?

Thanks! William


Solution

  • It depends on which transport protocol and server you use.

    Http

    You can add a list of users which are permitted to push into a repo in the .hg/hgrc configuration file.

    [web]
    allow_push = frodo, sam
    

    SSH

    You can use either the file permission system of your OS, or one of the ssh wrappers described in SharedSSH.

    File

    You can use the file permission system of your OS.