[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Running svnsync from post-commit hook

From: Joshua Oreman <oremanj_at_gmail.com>
Date: 2007-08-27 18:09:22 CEST

[forgot to cc: the list...]

On 27 Aug 2007 11:41:33 +0100, Marc Girod <mgirod@iona.com> wrote:
> Hello,
>
> [ . . . ]
> In particular, I try to invoke 'svnsync synchronize' in the
> post-commit (and post-revprop-change) hook(s), and get into access
> right issues:
>
> - the hooks are run under the account of the committer: good for
> sending mail, but bad for running svnsync synchronize...
> - I understand (now) that this is the reason for the '--username'
> option.
> - However, I'd like to avoid having to give the '--password' one
> - In any case, with or without these options, I get the following
> error:
>
> $ svnsync synchronize svn+ssh://stengers/x1/svnroot/foo --username vobadm
> svnsync: 'pre-revprop-change' hook failed with error output:
> Only the vobadm user may change revision properties
>
> Note however that this works:
>
> $ sudo -u vobadm svnsync synchronize svn+ssh://stengers/x1/svnroot/foo
> Committed revision 13.
> Copied properties for revision 13.
>
> I have tried to 'chown vobadm' and to 'chmod u+s' the svnsync binary,
> but without success.
>
> Can somebody point me to what I am doing wrong?

Have you tried this?
$ svnsync synchronize svn+ssh://vobadm@stengers/x1/svnroot/foo

You'll need to give each committer non-passworded (publickey) access
from the main repository machine to vobadm@stengers, which may or may
not suit the trust level you have in your committers. If you do trust
them with that, the easiest way is probably to make a wholly new
keypair, and store it in the repository somewhere:
$ ssh-keygen -t rsa -f /your/repository/conf/id_rsa.mirror
Add /your/repository/conf/id_rsa.mirror.pub to
stengers:/home/vobadm/.ssh/authorized_keys, and add the following to
each committer's ~/.subversion/config:

[tunnels]
sync = ssh -i /your/repository/conf/id_rsa.mirror

Then use 'svn+sync://vobadm@stengers' instead of 'svn+ssh://vobadm@stengers'.

But a better solution might be to switch to using svnserve or Apache.

HTH

-- Josh

> Thanks,
> Marc
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Aug 27 18:06:57 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.