I've got a SVN post-commit hook that updates a working copy when a commit is made to the repository. The post-commit hook executes the following command:
/usr/bin/svn update /path/to/working/copy
It was working fine until I enabled the Apache mod_dav Require valid-user
directive. Authentication is fine when using the tortoisesvn client for windows as it asks for your user name and password and saves the details. But as this is a non-interactive process the username and password is not supplied and the update fails.
Apache runs as user and group nobody
and nogroup
this is also the user and group that owns the repositories and the working copies.
The nobody
user does not have a password as it cannot login in. It's just used to run Apache etc. I tried adding nobody
to the dav_svn.passwd
file using the following command:
htpasswd dav_svn.passwd nobody
I get the following error when trying to run the post-commit script directly at the command line:
Authentication realm:
Update:
Adding the following to the dav_svn.conf:
Allow from 127.0.0.1
Satisfy any
Fixes the issue but then causes another issue in that the tortoisesvn client no longer requires authentication.