" Stash pullrequest builder" Jenkins的插件无法连接到Stash

时间:2016-02-25 13:21:45

标签: ssl jenkins bitbucket-server

我尝试使用" Stash pullrequest builder插件"将Stash和Jenkins集成在一起。在他们的页面上说,它应该是可用的变量" $ {pullRequestId}"。但我没有这份工作。作业日志中没有任何内容存在该错误(构建失败,因为变量$ {pullRequestId}不可用),但我在Jenkin的系统日志中遇到以下异常:

对于hudson.model.FreeStyleProject@678cb9ff [JOB_NAME],

stashpullrequestbuilder.stashpullrequestbuilder.StashBuildTrigger.run()失败 java.lang.RuntimeException:无法处理PR get请求; https://STASH_URL/rest/api/1.0/projects/PROJECT_NAME/repos/REPO_NAME/pull-requests?start=0     at stashpullrequestbuilder.stashpullrequestbuilder.stash.StashApiClient.getRequest(StashApiClient.java:180)     at stashpullrequestbuilder.stashpullrequestbuilder.stash.StashApiClient.getPullRequests(StashApiClient.java:68)     at stashpullrequestbuilder.stashpullrequestbuilder.StashRepository.getTargetPullRequests(StashRepository.java:69)     在stashpullrequestbuilder.stashpullrequestbuilder.StashPullRequestsBuilder.run(StashPullRequestsBuilder.java:30)     在stashpullrequestbuilder.stashpullrequestbuilder.StashBuildTrigger.run(StashBuildTrigger.java:218)     在hudson.triggers.Trigger.checkTriggers(Trigger.java:272)     在hudson.triggers.Trigger $ Cron.doRun(Trigger.java:221)     在hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:50)     at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:471)     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)     at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.access $ 301(ScheduledThreadPoolExecutor.java:178)     at java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)     在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)     at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615)     在java.lang.Thread.run(Thread.java:745) 引起:javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径     at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)     at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1916)     at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279)     在sun.security.ssl.Handshaker.fatalSE(Handshaker.java:273)     at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1472)     at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:213)     at sun.security.ssl.Handshaker.processLoop(Handshaker.java:913)     at sun.security.ssl.Handshaker.process_record(Handshaker.java:849)     at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1035)     at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1344)     at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:721)     at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)     在java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)     在java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)     在org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828)     在org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116)     在org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)     在org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)     在org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)     在org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)     在org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)     at stashpullrequestbuilder.stashpullrequestbuilder.stash.StashApiClient.getRequest(StashApiClient.java:173)     ......还有14个 引发者:sun.security.validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径     在sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)     at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)     at sun.security.validator.Validator.validate(Validator.java:260)     at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326)     at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)     at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)     at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1454)     ......还有31个 引起:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径     at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:196)     在java.security.cert.CertPathBuilder.build(CertPathBuilder.java:268)     at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)     ......还有37个

如何解决这个问题? 谢谢。

1 个答案:

答案 0 :(得分:0)

我找到了解决方案。在“高级”选项卡下,有复选框“忽略ssl证书”。检查后它没事。