acl.allow不在mercurial工作

时间:2011-03-01 07:07:40

标签: mercurial acl

当我尝试在Ubuntu机器上的.hg/hgrc文件中应用某些身份验证时,它无效。

我已将下面的代码添加到Ubuntu上的hgrc文件

[web]
allow_push=*
allow_read=*
push_ssl =false

[hooks]
pretxnchangegroup.acl=python:hgext.acl.hook

[acl.allow]
/home/test/testrepository/*=myid

当我将我的Windows资源库中的一些数据推送到Ubuntu上的testrepository时,会给出以下消息

pushing to http://ubantuip:8000
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
remote: error: pretxnchangegroup.acl hook failed: acl: access denied for changes
et 69f00e372c67
remote: transaction abort!
remote: rollback completed
remote: abort: acl: access denied for changeset 69f00e372c67

为什么我无法推动更改?

1 个答案:

答案 0 :(得分:0)

[acl.allow]中的路径相对于存储库的根目录。它们应该像这样使用,你可以对doc存储库下的文件进行“myid”访问:

[acl.allow]
doc/** = myid

您在配置文件中使用了绝对路径。