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

Re: post-commit hook not working

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-04-12 11:16:52 CEST

On Apr 12, 2006, at 06:50, Andreas Adelsberger | [amp] - Adelsberger
Media Productions wrote:

>>> here is my post-commit:
>>>
>>> /usr/bin/svn export http://svnserver/testrepository /var/www/html/
>>> testrepository
>>>
>>> if I start it manually with
>>> ./post-commit
>>> everything works fine, but If I do a commit with toroisesvn, I
>>> don't get errors but the hook script is not fired.
>>
>> Perhaps your repository requires authentication? If so, the hook
>> wouldn't know as whom to authenticate, and would fail. You can
>> pass a username and password to the svn command with the --
>> username and --password arguments.
>
> I don't think it can be an authentication issue becaue it doesn't
> make a difference if I make a commit as root or as a valid svn user
> (apache does the authentication for me). the strange thing is that
> for example a start-commit hook gets executed.

Let me put it a different way. Subversion is executing your post-
commit script. It encounters the line quoted above, which is supposed
to export the repository to some directory. This act of connecting to
the repository to perform the export perhaps requires authentication?
Do you allow anyone to check out or export your repository, or must
one authenticate? If the latter, then the svn command within your
hook script is trying to start an export, your repository is
answering that it requires authentication, your hook script doesn't
know how to provide that to the repository, and so nothing happens.
When you start it manually on the command line, it's likely using
your cached credentials in your .subversion directory in your home
directory, so you don't see the problem there.

Another possibility is that the user under which Apache runs does not
have a home directory, or if it does, that it does not have
a .subversion directory, and that this may be required. So try making
it.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Apr 12 11:18:00 2006

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.