Monday, 5 February 2007

CruiseControl.Net and SVN over SSL

On Microsoft Windows (2003 and XP) CruiseControl.Net is usually running as a service under the Local System Account (LSA), but, to update the working copy used from the integration service using a SVN repository contacted through SSL, we have to accept permanently the server certificate.
To achieve that, we have to log as Local System, which is accomplished using the command at with the interactive switch. In example, let's suppose that the time is 16:59, running the following command we'll open a Command Prompt running as LSA:
at 17:00 /interactive cmd.exe
Once logged in as LSA, it is just a matter of launching a svn up (or another command which is permitting us to save the server certificate) from the desidered working copy folder
, and to accept permanently the server certificate.
The server certificate will be then saved on the $UserProfile\Application Data\Subversion\auth\svn.ssl.server folder (where in the case of the LSA $UserProfile is usually something as C:\Documents and Settings\LocalService\).
Warning: no, you cannot log as LSA using the abovementioned trick from a terminal server. Use the console!


Jason said...

Excellent, thank you! I'm running Apache in front of SVN to allow HTTPS access and was stuck trying to get CC.Net to checkout from the repo to perform automated builds.

Gary Woodfine said...

Thanks your post helped to go in the write direction. I eventually solved my particular problem which I have blogged about too :-)