hg 对中央存储库的访问控制

发布于 2024-08-28 05:17:27 字数 234 浏览 6 评论 0原文

我们来自颠覆背景,我们有一位 QA 经理,一旦他验证所有 QC 活动都已完成,他就会向中央存储库授予提交权限。

我和几个同事开始使用 Mercurial,我们希望有一个共享存储库来包含我们的 QC 更改。每个开发人员 hg 都会克隆存储库并将其更改推送回共享存储库。我读过HG init教程并浏览了红豆书,但找不到如何控制谁可以将更改推送到共享存储库。

我们现有的 QA 经理控制的提交模型如何转换为善变的“中央”存储库?

We come from a subversion background where we have a QA manager who gives commit rights to the central repository once he has verified that all QC activities have been done.

Me and a couple of colleagues are starting to use mercurial, and we want to have a shared repository that would contain our QC-ed changes. Each of the developers hg clones the repository and pushes his changes back to the shared repository. I've read the HG init tutorial and skimmed through the red bean book, but could not find how to control who is allowed to push changes to the shared repository.

How would our existing model of QA-manager controlled commits translate to a mercurial 'central' repository?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

可爱咩 2024-09-04 05:17:27

HenriW 询问您如何提供存储库的评论正是正确的问题。如何设置身份验证完全取决于您如何为存储库提供服务(通过 Apache 的 HTTP、通过 hg-serve 的 HTTP、、ssh 等)。传输机制提供身份验证,然后 Mercurial 使用来自 Mr. Cat 链接的命令(本身无用)来处理访问控制。

由于您没有提到如何为存储库提供服务,因此设置可能很容易(您会记得提及 apache 或 ssh 设置的麻烦:)。所以我会猜测这两个:

如果您使用hgserve,那么您没有身份验证设置。您需要在 hgweb 或 hgwebdir 前面使用 apache、lighttp 或 nginx 来提供身份验证。在您执行allow_* 和deny_* 选项之前,要么所有人要么没有人。

如果您使用ssh,那么您已经从 ssh(可能还包括您的操作系统)获得了身份验证,因此您可以使用allow_* 和deny_* 指令(以及文件系统访问控制,如果您'喜欢)。

HenriW's comment asking how you are serving up the repositories is exactly the right question. How you set up authentication depends entirely on how you're serving your repo (HTTP via Apache, HTTP via hg-serve,, ssh, etc.). The transport mechanism provides the authentication and then mercurial uses that with the commands from Mr. Cat's link (useless in and of themselves) to handle access control.

Since you didn't mention how you're serving the repo, it was probably someting easy to set up (you'd have remembered to mention the hassle fo an apache or ssh setup :). So I'll ugess those two:

If you're using hg serve then you don't have authentication setup. You need to use apache, lighttp, or nginx in front of hgweb or hgwebdir to provide authentication. Until you do the allow_* and deny_* options are strictly everyone or no one.

If you're using ssh then you're already getting your authentication fromm ssh (and probably your OS), so you can use the allow_* and deny_* directives (and file system access controls if you'd like).

柠北森屋 2024-09-04 05:17:27

serverfault.com 有一个相关的问题以及指向发布存储库 Mercurial Wiki 页面。第一个展示了在服务器上使用 hgweb 时如何配置每个存储库的访问。我感觉您正在使用 ssh,维基页面将其标记为“私有”,因此我倾向于相信您必须退回到文件系统访问控制,即使存储库中的所有文件都属于该组“提交者”,授予组成员写入权限,其他人只读/只读。

serverfault.com has a relevant question and links to the Publishing Repositories Mercurial Wiki page. The first shows how to configure per-repository access when using hgweb on the server. I get a feeling that you're using ssh which the wiki page labels as "private" and am therefore inclined to believe you would have to fall back to file-system access control, i.e. make all the files in the repository belong to the group "commiters", give group members write access and everyone else read/only.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文