On 8/1/07, Danek Duvall <[EMAIL PROTECTED]> wrote: > On Wed, Aug 01, 2007 at 11:31:02AM +0800, Aubrey Li wrote: > > > I setup a repository by user "aaa", it's hosted at > > /export/home/aaa/hgroot/g11n, > > and user "bbb" need to clone that tree, So I created "authorized_keys" > > under /export/home/bbb/.ssh/ > > > > >cat authorized_keys > > >command="cd /export/home/aaa/hgroot; /usr/demo/mercurial/hg-ssh > > >g11n",no-port-forwarding,no-X11-forwarding,no-agent-forwarding ssh-rsa > > > > The command bit is needed for "bbb" to clone "aaa" 's tree. > > hg clone ssh://[EMAIL PROTECTED]/g11n > > > > Otherwise hg clone doesn't work. > > You really shouldn't need that. What happens when you don't have the > command setting there? Perhaps something like "repo not found"? > > It looks like one way to make your setup work would be to use the full path > to the repo: > > hg clone ssh://[EMAIL PROTECTED]//export/home/aaa/hgroot > > (note the double slash after the machine; that indicates an absolute path, > rather than one relative to bbb's home directory). > > Alternatively (and this is what I'm doing for a shared repo here at work), > you can simply log in as aaa, not bbb -- put your public key into aaa's > authorized_keys, and it should allow you in. If aaa is a real user, then > they may want to set up the command for your key to only allow running > something mercurial, but maybe they trust you. :) > > Going down that path also means you don't have to worry about permissions > on files and directories in the repo -- everything can be owned by a single > user. > > > But it's the first time I setup mercurial server, please correct me if > > I'm going a wrong way. > > I don't think there's a wrong way, other than one that doesn't work the way > you want it. ;-) > > Danek > Both the methods are acceptable for me, thanks a lot for your kindly help, ;-)
-Aubrey _______________________________________________ tools-discuss mailing list tools-discuss@opensolaris.org