1

I am trying to integrate Automated build process using Cruisecontrol.net latest version using the source control as "SVN". While running the CruiseControl build I am getting below error.

ThoughtWorks.CruiseControl.Core.CruiseControlException: Source control operation failed: svn: E175002: Unable to connect to a repository at URL     'https://abc01.test.co.in:1234/svn/test/trunk/Myapp/My%20Test%20Application'
svn: E175002: OPTIONS of 'https://abc01.test.co.in:1234/svn/test/trunk/Myapp/My%20Test%20Application': Server certificate verification failed: certificate issued for a different hostname,     issuer is not trusted (https://abc01.test.co.in:1234)
. Process command: svn log "https://abc01.test.co.in:1234/svn/test/trunk/Myapp/My Test Application" -r "{2013-06-18T11:39:13Z}:{2013-06-18T11:41:24Z}" --verbose --xml --username test_user --    password ******** --no-auth-cache --non-interactive
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.Execute(ProcessInfo processInfo)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Svn.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)

While my "CCNet.config" Config file looks as below,

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<!-- This is your CruiseControl.NET Server Configuration file. Add your projects below! -->

<project>
<name>My Test App</name> 
<webURL>http://localhost/ccnet-dashboard/?_action_ViewProjectReport=true&amp;server=local&amp;project=My Test App</webURL> 
<triggers>
    <intervalTrigger seconds="120"/>
</triggers>
<workingDirectory>D:\Repository\Myapp\My Test Application</workingDirectory>
<modificationDelaySeconds>2</modificationDelaySeconds>

<sourcecontrol type="svn">
    <trunkUrl>https://abc01.test.co.in:1234/svn/test/trunk/Myapp/My Test Application</trunkUrl>
    <workingDirectory>D:\Repository\Myapp\My Test Application</workingDirectory>
    <username>test_user</username>
    <password>user123</password>  
</sourcecontrol>
<tasks>
    <msbuild>
        <executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
        <workingDirectory>D:\Repository\Myapp\My Test Application</workingDirectory>
        <projectFile>SampleApp.sln</projectFile>
        <targets>ReBuild</targets >
        <timeout>600</timeout >
        <logger>c:\Program Files\CruiseControl.NET\server\Rodemeyer.MsBuildToCCNet.dll</logger >
    </msbuild>
</tasks>
<publishers>
    <merge>
        <files>
            <file>D:\CruiseControlBuildArtifact\build\*-results.xml</file>
            <file>D:\CruiseControlBuildArtifact\build\fxcop\*.xml</file>
            <file>D:\CruiseControlBuildArtifact\build\unittests\Coverage.xml</file>
        </files>
    </merge>
    <xmllogger />
    <statistics />
</publishers>
<externalLinks>
    <externalLink name="IIS Root Web on Localhost" url="http://localhost/" />
    <externalLink name="Google" url="http://www.google.com/search?hl=en&amp;lr=&amp;q=%22CruiseControl.NET%22&amp;btnG=Search" />
</externalLinks>
</project>
</cruisecontrol>

If I am taking the local version of this application and use CruiseControl build, it works fine, but while using this through SVN, I am getting this error.

Please suggest what needs to be corrected here.

Regards, Manoj

Aryan
  • 374
  • 1
  • 2
  • 14
  • 2
    You should read the error message... your ssl certificate isn't valid. you can manually accept it, or add the cert. http://stackoverflow.com/questions/3147660/server-certificate-verification-failed-issuer-is-not-trusted – thekbb Jun 18 '13 at 15:30
  • when I try to connect the svn using IE/ through TortosieSVN, it works correctly, how can I accept it manually or add the certificate. Can you please let me know the steps?? Also, when I try to run the command "svn list " from command prompt, it does not ask me to confirm the certificate and it shows the Folders available on the specified URL path. – Aryan Jun 18 '13 at 16:00

2 Answers2

2

Log into the CC.NET machine with the IDENTITY that runs the CC.NET service.

Find the svn.exe.

Open a command line prompt.

do a simple svn.exe list command, pointed at your SVN repository.

svn.exe list https://abc01.test.co.in:1234/svn/test/trunk/Myapp/

You will be prompted to accept the certificate.

Press "p" for permanent.

The key is...you must login as the same identity which runs the CC.NET service.

granadaCoder
  • 26,328
  • 10
  • 113
  • 146
  • I tried your solution, but its not prompting me to accept the certificate, instead it gives me the list of all the directory in the specified path. – Aryan Jun 19 '13 at 08:10
  • I have changed the user id / pwd(same as svn user id/pwd) for the user under which the CruiseControl.NET service was running, but so success. – Aryan Jun 19 '13 at 09:18
  • check the answer that thekbb gave you........and pay attention to this in that link "--trust-server-cert" – granadaCoder Jun 19 '13 at 13:15
1

Thanks everyone for helping...

earlier I was not getting the prompt for user name and password..to do so I did the below thing and now its working fine..

Open Command prompt and run following command in the command prompt:

runas /user:<SVN User> cmd

Replace "<SVN User>" with SVN username, if it is a domain user then use "<Domain Name>\<SVN Username>" format.

Above command will open a new command prompt for the SVN user. On this new command prompt, run following SVN command:

svn.exe list https://abc01.test.co.in:1234/svn/test/trunk/Myapp/

Now, it should prompt to accept certificate and then press "p" when it asks.

and its working now with CCNet as well..

Aryan
  • 374
  • 1
  • 2
  • 14
  • Did you login into the machine as "\" .. and that didn't work? Thus you came up with this workaround? (just asking for future reference) – granadaCoder Jun 19 '13 at 16:17
  • Machine on which I was running the CCNET, I had logged in using other account. So the command prompt which I use to get was of the logged in user and not the SVN user. So I changed the command prompt to use the SVN user with the help of above workaround( runas /user: cmd) way, and then this workaround prompted me to accept the certificate on which I pressed "p". After this I ran the CCNET service under SVN user account, and it worked for me. – Aryan Jun 20 '13 at 11:26
  • Right, that is simply the command line version of : logging in as a another user. The key to the whole thing was accepting the certificate as (p). – granadaCoder Mar 16 '15 at 19:14