views:

125

answers:

1

Hi there,

I have a post-commit hook that should update a working copy like this

/usr/bin/svn update /home/xxxx/htdocs/devel

That unfortunately fails. (subversion should run as www-data, as I'm using apache with it.) Trying this:

su www-data
env - /xxxx/hooks/post-commit /xxxx/$REPO $REV

results in:

Authentication realm: <svn://xxxx:3690> weird-looking-code
Password for 'www-data':

I then tried to type in some accounts/passwords, but neither the system accounts (root, ...) nor the accounts in the apache user file that protects the svn repository are working.

I even tried to

chown -R www-data:www-data /home/xxxx/htdocs/devel

but that doesn't work either.

Any suggestions?

A: 

You should find out which user is allowed to execute the command /usr/bin/svn update /home/xxxx/htdocs/devel by executing it manually. After that you can use the line:

/usr/bin/svn update --username <xxx> /home/xxxx/htdocs/devel

...in your post-commit hook.

tangens