Mercurial 中的 ACL
我正在尝试让 ACL 在 Mercurial 中工作。现在,我不确定它是否会起作用,因为我使用的是 hg 1.5.1。 (我正在努力弄清楚我必须与谁交谈才能让别人为我升级)
假设 1.5.1 将支持它,我的 hgrc 文件看起来像:
[extensions]
acl =
[hooks]
# Use this if you want to check access restrictions at commit time
pretxncommit = python:hgext.acl.hook
# Use this if you want to check access restrictions for pull, push,
# bundle and serve.
pretxnchangegroup = python:hgext.acl.hook
[acl]
# Check whether the source of incoming changes is in this list where
# "serve" == ssh or http, and "push", "pull" and "bundle" are the
# corresponding hg commands.
sources = serve push pull
等等
我得到:
error: pretxnchangegroup hook failed: acl: access denied for changeset 242c80d5c009
transaction abort!
rollback completed
abort: acl: access denied for changeset 242c80d5c009
目前,我只是在一个小型的非服务器存储库上执行此操作,但最终这将在一个普通的大型 HTTPS 服务器上...
谢谢
编辑:[更改了 hgrc 文件] 好吧,现在我似乎已经到了 1/2。当我尝试推送一个不允许的分支时,我得到:
error: pretxnchangegroup.acl hook failed: acl: user "brian_postow" not allowed on branch "branch-b" (changeset "597eddef10a1")
transaction abort!
rollback completed
abort: acl: user "brian_postow" not allowed on branch "branch-b" (changeset "597eddef10a1")
这看起来是正确的(也许?)但是,当我从我AM允许的分支推送时,我得到:
error: pretxnchangegroup.acl hook failed: acl: access denied for changeset 242c80d5c009
transaction abort!
rollback completed
abort: acl: access denied for changeset 242c80d5c009
所以,我似乎仍然无法推动...有什么想法吗?
I'm trying to get ACL working in Mercurial. Now, I'm not positive that it will work at all because I'm using hg 1.5.1. (I'm working on figuring out who I have to talk to to get someone to upgrade that for me)
Assuming that 1.5.1 will support it, my hgrc file looks like:
[extensions]
acl =
[hooks]
# Use this if you want to check access restrictions at commit time
pretxncommit = python:hgext.acl.hook
# Use this if you want to check access restrictions for pull, push,
# bundle and serve.
pretxnchangegroup = python:hgext.acl.hook
[acl]
# Check whether the source of incoming changes is in this list where
# "serve" == ssh or http, and "push", "pull" and "bundle" are the
# corresponding hg commands.
sources = serve push pull
etc
I'm getting:
error: pretxnchangegroup hook failed: acl: access denied for changeset 242c80d5c009
transaction abort!
rollback completed
abort: acl: access denied for changeset 242c80d5c009
Currently, I'm just doing this on a tiny non-server repo, but eventually this will be on a normal large HTTPS server...
thanks
EDIT: [ changed hgrc file]
Ok, now I seem to be 1/2 there. When I try to push on a branch I'm not allowed to, I get:
error: pretxnchangegroup.acl hook failed: acl: user "brian_postow" not allowed on branch "branch-b" (changeset "597eddef10a1")
transaction abort!
rollback completed
abort: acl: user "brian_postow" not allowed on branch "branch-b" (changeset "597eddef10a1")
Which looks correct (maybe?) However, when I push from a branch that I AM allowed to, I get:
error: pretxnchangegroup.acl hook failed: acl: access denied for changeset 242c80d5c009
transaction abort!
rollback completed
abort: acl: access denied for changeset 242c80d5c009
so, I still don't appear to be able to push... Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
其实我解决了这个问题。问题是我有 [acl allowed] 但里面什么都没有...我以为branches.allow 会取代allow,但我想不会。
谢谢。!
Actually I solved this problem. The problem was that I had [acl allow] but nothing in it... I thought that branches.allow would supercede allow, but I guess not.
thanks.!