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

  1. Start a DOS console session
  2. Get the Local Time ( Use the TIME shell Command)
  3. Make a note of this time and add 1 minute to it
  4. Run the AT command with the new time
  5. 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).

posted on Tuesday, April 28, 2009 6:22 PM |

Comments

Gravatar
# re: VisualSVN certificate error using post-commit hook to replicate to another Subversion repository (Gary Woodfine @ 4/29/2009 8:00 PM)

Thanks for the reference dude.
Hope everything works out for you.
 
Gravatar
# re: VisualSVN certificate error using post-commit hook to replicate to another Subversion repository (Alan @ 5/14/2009 10:42 AM)

I couldn't get this to work in Windows 2008 server, but I managed to solve the problem by adding a line to my hook file to respond to the SVN prompt.

echo "p"
 
Gravatar
# re: VisualSVN certificate error using post-commit hook to replicate to another Subversion repository (karthick @ 7/2/2009 5:42 PM)

Hi ,

I have a Visual svn server installed in windows xp platform. This is the master server.

I have another SVN server installed in Fedora. This is as a slave. I need to replicate the updates in the master server to the slave server. how to do the replication process.

Pls help me thanks
 
Gravatar
# re: VisualSVN certificate error using post-commit hook to replicate to another Subversion repository (Sam Wood @ 7/2/2009 6:18 PM)

Hi Karthick,

I'm not a Linux guy, so I won't be much help unfortunately.

You could try following the links in the post above and see how far that gets you.

 
Gravatar
# re: VisualSVN certificate error using post-commit hook to replicate to another Subversion repository (EffKay @ 7/30/2009 2:12 PM)

Hi.

I'm running Windows 7 and have this exact problem using a post-commit hook in VisualSVN Server with ssl. The certificate-info is stored for my user account in windows and the hook cant access it since it is run as system.

I tried the solution, but "due to security enhancements, the planned task will run but not interactive". Thats the error msg I get when I try the AT command. Got an alternative to this? I'm really stuck.
 
Gravatar
# re: VisualSVN certificate error using post-commit hook to replicate to another Subversion repository (Sam Wood @ 7/30/2009 5:44 PM)

Yeah, with Vista/7 you can't cheat and run batch files like that from Session 0.

Have you tried the code sample on the Three Nine web site (from the link in the post)?

Post Comment

Title *
Name *
Email
Url
Comment *  
Remember me
Please add 7 and 5 and type the answer here:

Search

Site Sections

Recent Posts

Archives

Post Categories

WHS Add-In Tutorial

WHS Blogs

WHS Development