使用SVN和CruiseControl.net构建应用程序时出错

时间:2013-06-18 15:13:42

标签: svn cruisecontrol.net

我正在尝试使用Cruisecontrol.net最新版本使用源代码控制作为“SVN”集成自动构建过程。在运行CruiseControl构建时,我遇到了错误。

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)

虽然我的“CCNet.config”配置文件如下所示,

<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>

如果我正在使用此应用程序的本地版本并使用CruiseControl构建,它可以正常工作,但在通过SVN使用时,我收到此错误。

请在此建议需要纠正的内容。

此致 的Manoj

2 个答案:

答案 0 :(得分:2)

使用运行CC.NET服务的IDENTITY登录CC.NET计算机。

找到svn.exe。

打开命令行提示符。

执行一个简单的svn.exe list命令,指向你的SVN存储库。

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

系统将提示您接受证书。

按“p”表示永久性。

关键是......你必须以运行CC.NET服务的相同身份登录。

答案 1 :(得分:1)

感谢大家的帮助......

之前我没有得到用户名和密码的提示..这样做我做了下面的事情,现在它的工作正常..

打开命令提示符并在命令提示符下运行以下命令:

runas /user:<SVN User> cmd

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

上面的命令将为SVN用户打开一个新的命令提示符。在此新命令提示符下,运行以下SVN命令:

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

现在,它应该提示接受证书,然后在询问时按“p”。

它现在也在与CCNet一起工作..