Kurt Granroth
2010-07-22 21:46:13 UTC
The 'trusted' users feature has never worked for me and since it's just
been a tiny annoyance (extra warning message), I never took the time to
dig into it. Well, I did now... and it's not working the way I expect
it to.
I'm using the 'mercurial-server' package so all repo access goes through
the 'hg' user. I have a local user on the server called 'hgadmin' that
is in the same 'hg' group and can modify the repos locally if necessary.
So I create a repo on the server using the 'hgadmin' user and create a
simple hgrc file:
***@hgserv$ ls -l test/.hg/hgrc
-rw-rw-r-- 1 hgadmin hg 46 Jul 22 14:36 test/.hg/hgrc
I clone that from my workstation as the 'kurt' user:
***@local$ hg clone ssh://***@hgserv/test
destination directory: test
requesting all changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 3 changes to 2 files
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
remote: Not trusting file test/.hg/hgrc from untrusted user hgadmin,
group hg
remote: Not trusting file /home/hg/repos/test/.hg/hgrc from untrusted
user hgadmin, group hg
Okay, so hgadmin is untrusted. Let's try to change that. I edit the
'hg' user's .hgrc:
***@hgserv$ tail ~hg/.hgrc
[trusted]
users = hgadmin,hg
groups = hg
Try again.. and still no go. I get the same "untrusted user" message.
So maybe the trusted part is in the local user and not the remote user?
***@local$ tail ~kurt/.hgrc
[trusted]
users = hgadmin,hg
groups = hg
Try again... and still nope.
So where should the 'trusted' user section go in order to not get that
warning message any more?
Kurt
been a tiny annoyance (extra warning message), I never took the time to
dig into it. Well, I did now... and it's not working the way I expect
it to.
I'm using the 'mercurial-server' package so all repo access goes through
the 'hg' user. I have a local user on the server called 'hgadmin' that
is in the same 'hg' group and can modify the repos locally if necessary.
So I create a repo on the server using the 'hgadmin' user and create a
simple hgrc file:
***@hgserv$ ls -l test/.hg/hgrc
-rw-rw-r-- 1 hgadmin hg 46 Jul 22 14:36 test/.hg/hgrc
I clone that from my workstation as the 'kurt' user:
***@local$ hg clone ssh://***@hgserv/test
destination directory: test
requesting all changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 3 changes to 2 files
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
remote: Not trusting file test/.hg/hgrc from untrusted user hgadmin,
group hg
remote: Not trusting file /home/hg/repos/test/.hg/hgrc from untrusted
user hgadmin, group hg
Okay, so hgadmin is untrusted. Let's try to change that. I edit the
'hg' user's .hgrc:
***@hgserv$ tail ~hg/.hgrc
[trusted]
users = hgadmin,hg
groups = hg
Try again.. and still no go. I get the same "untrusted user" message.
So maybe the trusted part is in the local user and not the remote user?
***@local$ tail ~kurt/.hgrc
[trusted]
users = hgadmin,hg
groups = hg
Try again... and still nope.
So where should the 'trusted' user section go in order to not get that
warning message any more?
Kurt