开发者

Using Mercurial/Tortoisehg is there a way to set repository permissions?

Im trying to setup repository permissions with Mercurial/Tortoisehg. What I would like to do is have 1 person be the administrator and only that person is allowed to commit/push/pull to the repository. Everyone else would have to send that person a patch if they want to get the开发者_如何学运维ir changes into the repository.

Thanks for any help, Metropolis


That functionality depends on how people are accessing your repository, which could be:

  1. local file access
  2. ssh network access
  3. http access via built-in hg serve
  4. http access via external web-server

You can see pluses and minuses along with instructions for each on the PublishingRepositories wiki page.

Per-user access controls are available in options 1,2, and 4 above. With options 1 (file) and 2 (ssh) you'll be counting on your operating system's built in user controls. With option 2 (ssh) you could also mix in the shared ssh techniques for additional access controls. With option 4 (external http server) the sky is the limit. Authentication comes from the HTTP layer (e.g: apache) and mercurial uses that info along with the allow_push settings to grant access.

In cases 1, 2, or 4 you can also mix in the ACL extension for even more fine grained control.

Bottom-line: totally doable and commonly done, but you've got some decisions to make about how depending on how public your repo is and where you want to be controlling credentials.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜