hg-admin-tools: manage access for multiple developers via ssh
Sean Kelley
sean.v.kelley at gmail.com
Mon Jul 7 00:33:03 CDT 2008
Hi,
I tried out our hg-admin-tools and I really like it. One issue I came
across is in the checking for good path. I kept on getting this error
when trying to clone a particular repo:
$ hg clone ssh://hg@hg.mysite.net/hg/platforms/vendorsrc/pulse/pulseaudio-0.9.8
remote: Disallowing path: hg/platforms/vendorsrc/pulse/pulseaudio-0.9.8
abort: no suitable response from remote hg!
I had to comment out the following lines in your hg-ssh:
def getpath(path):
if path.endswith("/"):
path = path[:-1]
# if not ruleset.goodpath(path):
#fail("Disallowing path: %s" % path)
return path
Where you have goodpath defined as in ruleset.py:
# Copyright 2008 LShift Ltd
# Author(s):
# Paul Crowley <paul at lshift.net>
#
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.
import re
allowedchars = "A-Za-z0-9_-"
goodpathre = re.compile("([%s]+/)*[%s]+$" % (allowedchars, allowedchars))
def goodpath(path):
return goodpathre.match(path) is not None
Can you explain to me why this path fails?
$ hg clone ssh://hg@hg.mysite.net/hg/platforms/vendorsrc/pulse/pulseaudio-0.9.8
Thanks,
Sean
On Fri, Apr 18, 2008 at 4:41 AM, Paul Crowley <paul at lshift.net> wrote:
> I present hg-admin-tools, which helps you provide and manage a central
> Mercurial repository server with many repositories to which many
> developers have access.
>
> Like hg-ssh (which this is based on), developers authenticate themselves
> to the server using ssh keys. However, this system has several
> advantages over hg-ssh as shipped:
>
> * Managing access is made easy: just modify a directory of SSH keys or a
> rules file, and push the changes; they take effect when you push them.
> * You can remotely create new repositories on the server with "hg clone"
> as well as connecting to existing ones
> * The name of the connecting user is provided as an environment variable
> to hooks
>
> This is all done with 174 lines of code; doubtless there's room for
> more, but this is proving very useful for us. All suggestions (and
> patches) gratefully received.
>
> http://hg.opensource.lshift.net/hg-admin-tools/file/tip/README
>
> http://hg.opensource.lshift.net/hg-admin-tools
> --
> [][][] Paul Crowley
> [][] LShift Ltd
> [] [] www.lshift.net
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
More information about the Mercurial
mailing list