简体   繁体   English

acl.allow不能正常工作

[英]acl.allow not working in mercurial

When I am trying to apply some authentication in .hg/hgrc file on Ubuntu machine its not working. 当我尝试在Ubuntu计算机上的.hg/hgrc文件中应用一些身份验证时,它不起作用。

I have added below code to hgrc file on Ubuntu 我在Ubuntu的hgrc文件中添加了以下代码

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

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

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

When I am pushing some data from my Windows repository to testrepository on Ubuntu giving below message 当我将一些数据从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

why I am not able to push the changes? 为什么我无法推动更改?

The paths in the [acl.allow] are relative to the root of the repository. [acl.allow]中的路径是相对于存储库根目录的。 They are meant to be used like this where you give "myid" access to the files under the doc repository: 它们应按以下方式使用,您可以在doc存储库中授予“ myid”访问文件的权限:

[acl.allow]
doc/** = myid

You have used an absolute path in your config file. 您已在配置文件中使用了绝对路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM