hook failed: ACL problem with pushing to server

Thomas Kaspari mass at lypke.de
Tue Aug 14 14:37:50 UTC 2012


Hi list,

we are trying to restrict access to our present repositories and read 
the tutorial "http://mercurial.selenic.com/wiki/AclExtension" and some 
other websites. But we still have some trouble with pushing our local 
commits to the running server of hg.

The issue:
- The newest version of mercurial 2.3 on Debian, Ubuntu and WindowsXP 
was installed.
- We have configured the hg by using the following hgrc and served it 
with "hg serve".
- Cloning and commiting the repository locally is fine.

- BUT pushing the local history to the running server returns the error

    />>> *error: pretxnchangegroup.acl hook failed: acl: user "" not
    allowed on "test.txt"*/

Same thing by using a local file ".hgrc" with [ui] in the ropository 
directory or/and in the home directory.
It seems to be a problem that no username was given to the hook to 
vertify if the user is allowed or denied to push. Everytime we push, the 
username is empty. Although in the log of hg the username "gooduser" 
appears.

On each OS we had the same configuration and the same problems... :-/ So 
where we did go wrong with the config?

Thanks for your help! :)

Thomas

-------------------------------------------------------------------------------
$ cat .hg/hgrc

    [ui]
    username = hg_admin <admin at localhost>

    [web]
    allow_push = *
    push_ssl = false

    [extensions]
    hgext.acl =

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

    [acl]
    sources = serve

    [acl.deny]
    ** = baduser

    [acl.allow]
    ** = gooduser

-------------------------------------------------------------------------------
$ hg verify
 >>> checking changesets
 >>> checking manifests
 >>> crosschecking files in changesets and manifests
 >>> checking files
 >>> 0 files, 0 changesets, 0 total revisions
-------------------------------------------------------------------------------
$ hg summary
 >>> parent: -1:000000000000 tip (empty repository)
 >>> branch: default
 >>> commit: (clean)
 >>> update: (current)
-------------------------------------------------------------------------------
local hgrc

    [ui]
    username = gooduser <gooduser at localhost>
    verbose = true

    [paths]
    default = http://hg_server:8000/

-------------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20120814/19ce6179/attachment-0002.html>


More information about the Mercurial mailing list