2013-06-18 60 views
1

我正在嘗試使用Cruisecontrol.net最新版本使用源代碼管理作爲「SVN」來集成自動構建過程。在運行CruiseControl構建時,我收到了錯誤。使用SVN和CruiseControl.net構建應用程序時出錯

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,我得到這個錯誤。

請在這裏提出需要糾正的問題。

問候, 馬諾

+2

您應該閱讀錯誤消息...您的ssl證書無效。你可以手動接受它,或者添加證書。 http://stackoverflow.com/questions/3147660/server-certificate-verification-failed-issuer-is-not-trusted – thekbb

+0

當我嘗試使用IE /通過TortosieSVN連接svn,它工作正常,我該如何接受它手動或添加證書。你能否讓我知道步驟?另外,當我嘗試從命令提示符運行命令「svn list 」時,它不會要求我確認證書,並且它會顯示指定URL路徑上的可用文件夾。 – user1662589

回答

2

登錄到CC.NET機與運行CC.NET服務的身份。

找到svn.exe。

打開命令行提示符。

做一個簡單的svn.exe列表命令,指向你的SVN倉庫。

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

系統將提示您接受證書。

按「p」爲永久。

關鍵是...您必須以運行CC.NET服務的相同身份登錄。

+0

我試過你的解決方案,但它並沒有提示我接受證書,而是它給了我指定路徑中所有目錄的列表。 – user1662589

+0

我已經更改CruiseControl.NET服務運行的用戶的用戶id/pwd(與svn用戶id/pwd相同),但成功。 – user1662589

+0

檢查thekbb給你的答案........並在該鏈接中注意這一點「--trust-server-cert」 – granadaCoder

1

感謝大家的幫助...

前,我沒有得到提示輸入用戶名和password..to這樣做,我做了下面的事情,現在它工作正常..

打開命令提示並在命令提示符下運行以下命令:

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一起工作。

+0

你是否以「 \ 登錄到機器中」。 。那不起作用?因此你想出了這個解決方法? (只是要求將來參考) – granadaCoder

+0

我在其上運行CCNET的機器,我用其他帳戶登錄過。所以我使用的命令提示符是登錄用戶,而不是SVN用戶。所以我更改了命令提示符,在上述解決方法(runas/user: cmd)的幫助下使用SVN用戶,然後此解決方法提示我接受按下「p」的證書。在此之後,我使用SVN用戶帳戶運行CCNET服務,併爲我工作。 – user1662589

+0

對,就是簡單的命令行版本:以另一個用戶身份登錄。整個事情的關鍵是接受證書(p)。 – granadaCoder

相關問題