[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: Marc Girod <mgirod_at_iona.com>
Date: 2007-09-04 18:30:44 CEST

Hi,

I am still trying to get mirror synchronization to work from the
post-commit hook.

I have now:
- decided to use http:// and --username x --password y --non-interactive
  instead of svn+ssh:// which would have required to setup keys under
  the users home directories.
- created a new account for that, and used it on both sides (as I
  couldn't get it to work only on the mirror as I first tried)

I get however:

bar> svn -m 'start again' ci
Adding aa.txt
Transmitting file data .
Committed revision 4.

Warning: 'post-commit' hook failed with error output:
svnsync: DAV request failed; it's possible that the repository's pre-revprop-change hook either failed or is non-existent
svnsync: At least one property change failed; repository is unchanged

and on the mirror server:

svnroot> sudo tail -1 /var/log/httpd/error_log
[Tue Sep 04 16:47:42 2007] [error] [client 10.5.2.144] PAM: user 'svnsync' - not authenticated: Authentication failure

I check that my hooks are in place, executable:

svnroot> cat /x1/svntools/mirror/pre-revprop-change
#!/bin/sh

USER="$3"

if [ "$USER" = "svnsync" ]; then exit 0; fi

echo "Only the 'svnsync' user may change revision properties on the mirror" >&2
exit 1
svnroot> cat /x1/svntools/mirror/start-commit
#!/bin/sh

USER="$2"

if [ "$USER" = "svnsync" ]; then exit 0; fi

echo "Only the svnsync user may commit new revisions" >&2
exit 1

and match my post-commit on the source:

bar> tail -1 /x1/svnroot/bar/hooks/post-commit
svnsync synchronize http://stengers/repos/bar --username svnsync --password n0b0dykn0ws --non-interactive

Note that '/repos' should be OK:
svnroot> grep -A2 /repos /etc/httpd/conf/httpd.conf
<Location /repos>
  DAV svn
  SVNParentPath /x1/svnroot

I try to understand the httpd pam error...
I do have:

svnroot> grep pam /etc/httpd/conf/httpd.conf
LoadModule auth_pam_module modules/mod_auth_pam.so
svnroot> locate modules/mod_auth_pam.so
/usr/lib64/httpd/modules/mod_auth_pam.so
svnroot> strings /usr/lib64/httpd/modules/mod_auth_pam.so | grep mod_auth_pam/
PAM: mod_auth_pam/2.0-1.1

My user account is local (not a nis one) on both hosts, with the same
uid:

svnroot> grep svnsync /etc/passwd
svnsync:x:50009:20:Local for svn synchronization testing:/local/home/svnsync:/bin/bash

It was added with useradd and is properly shadowed.
What am I still missing?
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
Received on Tue Sep 4 18:30:33 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.