使用 Mercurial/Tortoisehg 有没有办法设置存储库权限?
我正在尝试使用 Mercurial/Tortoisehg 设置存储库权限。我想做的是让 1 人成为管理员,并且只有该人才被允许向存储库提交/推送/拉取。如果其他人想要将更改放入存储库,则必须向该人发送补丁。
感谢您的帮助,大都会
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 their changes into the repository.
Thanks for any help, Metropolis
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该功能取决于人们访问您的存储库的方式,可能是:
hgserve
进行您可以看到优点和缺点PublishingRepositories wiki 页面上提供了各个说明。
上述选项 1、2 和 4 中提供了每用户访问控制。使用选项 1(文件)和 2(ssh),您将依赖操作系统的内置用户控件。使用选项 2 (ssh),您还可以混合使用共享 ssh 技术来进行其他访问控制。使用选项 4(外部 http 服务器),一切皆有可能。身份验证来自 HTTP 层(例如:apache),mercurial 使用该信息以及
allow_push
设置来授予访问权限。在情况 1、2 或 4 中,您还可以混合使用 ACL 扩展,以获得更好的效果粒度控制。
底线:完全可行并且通常会这样做,但是您需要根据您的存储库的公开程度以及您想要控制凭证的位置来做出一些决定。
That functionality depends on how people are accessing your repository, which could be:
hg serve
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.