I’ve been working this afternoon to get replication to a remote server going for my various repositories. Thanks to Ross Hawkins, I got the basics working.
But when trying to use the recommended post-commit hook, the VisualSVN client was throwing the following error:
svnsync: OPTIONS of 'https://xxx/svn/TentacleSoftware': Server certificate verification failed: certificate issued for a different hostname, issuer is not trusted (https://xxxx)
Obviously, we’re using the default VisualSVN self-signed certificates here (buy real certs, kids). I was able to run the post-commit command on the server manually, and was prompted to accept the certificate, but the VisualSVN client still threw the same error.
The problem is that the VisualSVN Server service is running as Local System, not the user I was logged in as, and the Subversion authentication cache is per-user.
The quick and dirty solution is provided by ThreeNine:
If you are able access the server directly i.e. directly at the console. You can try and create an interactive service that just runs a CMD.exe in order to do this follow these following steps
- Start a DOS console session
- Get the Local Time ( Use the TIME shell Command)
- Make a note of this time and add 1 minute to it
- Run the AT command with the new time
- Wait for one minute for the command window to appear
Once the new console window opens you can launch svn up or another command which permits you to save an SSL certificate.
The command prompt is running as Local System, so the accepted certificate is cached by the same account that’s running VisualSVN Server. Just remember to connect to the console (that’s mstsc –admin, or mstsc –console if you’re using pre-SP3 Windows XP).