开发者

acl.allow not working in mercurial

开发者 https://www.devze.com 2023-02-14 05:33 出处:网络
When I am trying to apply some authentication in .hg/hgrc file on Ubuntu machine its not working. I have added below code to hgrc file on Ubuntu

When I am trying to apply some authentication in .hg/hgrc file on Ubuntu machine its not working.

I have added below code to hgrc file on Ubuntu

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

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

[acl.a开发者_StackOverflowllow]
/home/test/testrepository/*=myid

When I am pushing some data from my Windows repository to testrepository on Ubuntu giving below message

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. They are meant to be used like this where you give "myid" access to the files under the doc repository:

[acl.allow]
doc/** = myid

You have used an absolute path in your config file.

0

精彩评论

暂无评论...
验证码 换一张
取 消