Common hook troubleshooting steps are described at the official Subversion FAQ: "Why aren't my repository hooks working?".
The particular issue you've encountered is the side-effect of these facts:
You run VisualSVN Server with a self-signed certificate which is not trusted in your environment. Normally, you must manually accept such certificate on client-side.
Hooks are executed under the account which runs VisualSVN Server's service.
VisualSVN Server runs under
Network Service
account, by default. As far as I guess your VisualSVN Server instance runs underNetwork Service
account, so you have to login under Network Service, runsvn.exe
against the repository and permanently accept the certificate. You can't logon underNetwork Service
account as you usually logon under your user account but there is a smart trick which can help.
So there is 1 correct solution to this and 2 workarounds:
SOLUTION: Run VisualSVN Server with a trusted signed server certificate. You can obtain one from a certificate authority (i.e. buy the certificate) or sign server's certificate with Active Directory Certificate Services installed in your organization.
WORKAROUND1: Configure VisualSVN Server to run under a custom dedicated user account, login to Windows under this account, run
svn.exe
against the repository and permanently accept the untrusted certificate.WORKAROUND2: Keep VisualSVN Server running under
Network Service
and usepsexec
tool to accept the certificate underNetwork Service
account:You can use the Sysinternals's PsExec utility to run
svn.exe
under theNetwork Service
and accept the certificate manually. Execute the following command line to run the command prompt under theNetwork Service
account (adjust the command line if you run the service under other account):psexec -u "nt authority\network service" cmd.exe
Then permanently accept the certificate using the
svn.exe
. Run the following command and permanently accept the certificate when prompted:svn info <URL-to-repository>