I use Visual VSN Server which enables me to quickly and easily to set Subversion over the web. I set up my Repositories to be accessed over SSL. When checking in my code and firing off CC.net integration I kept of getting the following error:
PROPFIND request failed on '/Projectname'
svn: PROPFIND of '/Projectname': Server certificate verification > failed: issuer is not trusted
However I found when I logged onto the server and ran Cruise Control in interactive mode, I did not get this problem. The problem seemed to only when I was running CC.net without being logged onto the server.
Cause:
On MS Server 2003 the CC.net service runs under the Local System Account (LSA). To update the working copy from the integration service using a SVN repository contacted via SSL requires the SSL certificate to be permanently accepted by the Local System Account.
Solution:
There are two possible solutions depending on your enviroment set up.
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.
If you would like to automate this process you can also use the method for the remote server, as it automates this process anyway.
References:
The above technique will not work if you are accessing your server via remote desktop, due to some windows security feature. I had an issue where by I am based in the UK, and my server is based in the US, so getting to my console would be a bit of an expensive thing for me to do. In the end I found some tips out there on how to best tackle this issue, the result was a little console application which mimiced creating a service which the spawned another service which ran in the LSA to accpept the SSL certificate. Feel free to browse and download the code for this service below. I am currently updating the code as I foresee I will be reusing it quite a bit of the next few months.
This can be downloaded via my SVN site:
Please feel free to logon to my Subversion server and browse the source code. (You will have to accpet the certificate :-) ) Or you can actually download the code and use it if you wish. I will hopefully find some time to update the code. It works in it's current form albeit not elegantly.
Username : blogreader
password: password
https://source.threenine.co.uk/svn/sourcecontroltest/trunk/
The core of my little applicaiton that actually preforms the task is below:
static void StartService(string workingDirectory, string svnExePath, string requiredArguments)
{
ProcessStartInfo serviceProcess = new ProcessStartInfo();
Process runProcess = new Process();
serviceProcess.WorkingDirectory = workingDirectory;
serviceProcess.FileName = svnExePath;
serviceProcess.Arguments = string.Format(requiredArguments);
serviceProcess.CreateNoWindow = true;
serviceProcess.UseShellExecute = false;
serviceProcess.RedirectStandardInput = true;
serviceProcess.RedirectStandardOutput = true;
serviceProcess.RedirectStandardError = true;
runProcess.StartInfo = serviceProcess;
runProcess.Start();
System.Threading.Thread.Sleep(5000);
// Imitating pressing 'p' then enter:
runProcess.StandardInput.AutoFlush = true;
runProcess.StandardInput.WriteLine("p");
runProcess.StandardInput.Flush();
// Catch the output/errors in case this doesnt work for you -
//send yourself an email with these strings in them for debugging
string output = runProcess.StandardOutput.ReadToEnd();
string errors = runProcess.StandardError.ReadToEnd();
runProcess.WaitForExit();
}
Recommended reading