【问题标题】:Error while building application using SVN and CruiseControl.net使用 SVN 和 CruiseControl.net 构建应用程序时出错
【发布时间】:2013-06-18 15:13:42
【问题描述】:

我正在尝试使用 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 使用它时,我收到此错误。

请在这里提出需要更正的地方。

问候, 马诺杰

【问题讨论】:

  • 您应该阅读错误信息...您的 ssl 证书无效。您可以手动接受它,或添加证书。 stackoverflow.com/questions/3147660/…
  • 当我尝试使用 IE/ 通过 TortosieSVN 连接 svn 时,它工作正常,如何手动接受或添加证书。可以告诉我步骤吗??此外,当我尝试从命令提示符运行命令“svn list ”时,它不会要求我确认证书,而是显示指定 URL 路径上可用的文件夹。

标签: svn cruisecontrol.net


【解决方案1】:

使用运行 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 服务的同一身份登录。

【讨论】:

  • 我尝试了您的解决方案,但它没有提示我接受证书,而是为我提供了指定路径中所有目录的列表。
  • 我已经更改了运行 CruiseControl.NET 服务的用户的用户 id/pwd(与 svn 用户 id/pwd 相同),但成功了。
  • 检查kbb给你的答案........并在那个链接“--trust-server-cert”中注意这一点
【解决方案2】:

感谢大家的帮助...

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

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

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 列表https://abc01.test.co.in:1234/svn/test/trunk/Myapp/

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

它现在也与 CCNet 合作..

【讨论】:

  • 您是否以 "\" 身份登录机器......但没有成功?因此,您想出了这个解决方法? (仅供参考)
  • 运行 CCNET 的机器,我使用其他帐户登录。所以我用来获取的命令提示符是登录用户而不是 SVN 用户。所以我在上述解决方法(runas /user: cmd)的帮助下更改了命令提示符以使用 SVN 用户,然后这个解决方法提示我接受我按下“p”的证书。在此之后,我在 SVN 用户帐户下运行 CCNET 服务,它对我有用。
  • 对,这只是命令行版本:以另一个用户身份登录。整个事情的关键是接受证书作为(p)。
猜你喜欢
  • 1970-01-01
  • 2012-04-22
  • 2012-05-18
  • 2014-05-24
  • 1970-01-01
  • 1970-01-01
  • 2016-12-27
  • 1970-01-01
相关资源
最近更新 更多