I recently upgraded my Subversion server to VisualSVN Server 2.1 and started experiencing this issue again:

svnsync: OPTIONS of 'https://xxx/svn/TentacleSoftware': Server certificate verification failed: certificate issued for a different hostname, issuer is not trusted (https://xxxx)

It looks like the account under which the VisualSVN Server service runs has been changed, breaking my account profile work-around.

Some digging in Google revealed a more elegant solution to the problem; specifically set the configuration cache directory in the command line to a static location, so that any saved/accepted certificates are persisted between accounts.

As my normal user account on the server, I ran the following command:

svnsync sync https://xxx/svn/TentacleSoftware --config-dir "D:\Repositories\Config"

That let me permanently accept the certificate and saved the configuration to the specified directory. After appending the same config-dir option to my post-commit hooks, the service was able to sync as normal:

svnsync --non-interactive --trust-server-cert sync https://xxx/svn/TentacleSoftware --config-dir "D:\Repositories\Config" --source-username xxx --source-password xxx --sync-username xxx --sync-password xxx

Much nicer than my previous solution.

posted on Sunday, January 24, 2010 12:31 PM | Filed Under [ Development ]


# re: VisualSVN Server 2.1 post-commit certificate error (Darrel @ 1/29/2010 5:37 AM)

I've been struggling with the same problem you described, and your solution worked great for me too. Thanks so much for sharing this information!
# re: VisualSVN Server 2.1 post-commit certificate error (Marco @ 11/13/2010 7:16 AM)

I had a similar issue with Visual SVN, also on post_commit hook.
Since it's running as NetworkService account it looks for configuration in its appData folder. Even using svn with --non-interactive --no-auth-cache and -trust-server-cert , svn.exe looks for auth cached certs in auth folder under NetworkService's appdata folder...without success.. and exiting the process without notifying any error.
I solved the issue just copying cached certs from my normal user account's appdata folder to networkservice's one.

Post Comment

Title *
Name *
Comment *  
Remember me
Please add 6 and 7 and type the answer here:


Site Sections

Recent Posts


Post Categories

WHS Add-In Tutorial

WHS Blogs

WHS Development