詹金斯& TFS插件

时间:2014-08-27 18:34:21

标签: .net tfs jenkins

我正在触发Jenkins的构建。源代码在TFS中。使用TFS插件进行集成。 当我触发构建时,它会创建work_space并更新它,并在下面给出关于证书的错误。请指教!!!

==

所有文件都是最新的。

致命:sun.security.validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径 com.microsoft.tfs.core.exceptions.TECoreException:sun.security.validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径     在com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:99)     在com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:23)     在com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:70)     在com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:645)     在com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntry(RegistrationClient.java:188)     在com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntry(RegistrationClient.java:167)     在com.microsoft.tfs.core.clients.webservices.IdentityManagementService。(IdentityManagementService.java:65)     在hudson.plugins.tfs.model.Project.getVCCHistory(Project.java:84)     在hudson.plugins.tfs.model.Project.getDetailedHistory(Project.java:128)     在hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:56)     在hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:176)     在hudson.model.AbstractProject.checkout(AbstractProject.java:1254)     在hudson.model.AbstractBuild $ AbstractBuildExecution.defaultCheckout(AbstractBuild.java:624)     在jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)     在hudson.model.AbstractBuild $ AbstractBuildExecution.run(AbstractBuild.java:530)     在hudson.model.Run.execute(Run.java:1732)     在hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)     在hudson.model.ResourceController.execute(ResourceController.java:88)     在hudson.model.Executor.run(Executor.java:234) 引起:com.microsoft.tfs.core.ws.runtime.exceptions.TransportException:sun.security.validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到要求的有效证书路径目标     at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:744)     在com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473)     at ms.tfs.services.registration._03._RegistrationSoap12Service.getRegistrationEntries(_RegistrationSoap12Service.java:105)     在com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:65)     ......还有16个 引起:javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径     在sun.security.ssl.Alerts.getSSLException(未知来源)     at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)     在sun.security.ssl.Handshaker.fatalSE(未知来源)     在sun.security.ssl.Handshaker.fatalSE(未知来源)     at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)     在sun.security.ssl.ClientHandshaker.processMessage(未知来源)     在sun.security.ssl.Handshaker.processLoop(未知来源)     在sun.security.ssl.Handshaker.process_record(未知来源)     at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)     at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)     在sun.security.ssl.SSLSocketImpl.writeRecord(未知来源)     at sun.security.ssl.AppOutputStream.write(Unknown Source)     在java.io.BufferedOutputStream.flushBuffer(未知来源)     在java.io.BufferedOutputStream.flush(未知来源)     在com.microsoft.tfs.core.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:597)     在com.microsoft.tfs.core.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2518)     在com.microsoft.tfs.core.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1313)     在com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:508)     在com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:197)     在com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:464)     在com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:376)     在com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:588)     ......还有19个 引发者:sun.security.validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径     在sun.security.validator.PKIXValidator.doBuild(未知来源)     at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)     at sun.security.validator.Validator.validate(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)     在com.microsoft.tfs.core.config.httpclient.internal.DefaultX509TrustManager.checkServerTrusted(DefaultX509TrustManager.java:181)     at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(Unknown Source)     ......还有37个 引起:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径     at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)     在java.security.cert.CertPathBuilder.build(未知来源)

2 个答案:

答案 0 :(得分:3)

我使用插件尝试了AltF4_的解决方案,但也没有用。以下是问题的解决方法。

  

如果您通过SSL连接到服务器,则服务器的证书需要   得到Java的信任。 (Java使用不同的证书库,   比方说,Windows。)您可以使用keytool命令导入服务器   证书。

     

或者,您可以设置环境变量:   TF_ACCEPT_UNTRUSTED_CERTIFICATES =真

     

为了不验证SSL证书的信任链。

确保在设置env变量后重新启动Jenkins服务。

enter image description here

答案 1 :(得分:0)

我在Jenkin的问题日志中找到了这个链接,显然下载以下插件将有助于解决这个问题; - Link to the plgin

我从HERE

找到了问题

希望这有帮助 - 让我知道。