Question

I wanted to checkout when there is a commit to a particular path in svn. In VisualSVN -> Properties -> Post-Commit hook:

"D:\Program Files\VisualSVN Server\bin\svn.exe" checkout https://***.****.***/svn/Mobile/Node/trunk C:\MyPath

Then I went and did a commit, but I don't see any checkouts happened. When I execute the post-commit script manually it checks out to that path.

I am getting error as "- The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually! Certificate information:"

How can I resolve it?

No correct solution

OTHER TIPS

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:

  1. 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.

  2. Hooks are executed under the account which runs VisualSVN Server's service.

  3. VisualSVN Server runs under Network Service account, by default. As far as I guess your VisualSVN Server instance runs under Network Service account, so you have to login under Network Service, run svn.exe against the repository and permanently accept the certificate. You can't logon under Network 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 use psexec tool to accept the certificate under Network Service account:

    You can use the Sysinternals's PsExec utility to run svn.exe under the Network Service and accept the certificate manually. Execute the following command line to run the command prompt under the Network 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>

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top