将Jenkins与Black Duck Hub结合使用

时间:2018-10-22 11:25:12

标签: jenkins jenkins-plugins

我安装了Jenkins,下载了Black Duck Hub插件(v 4.0.1)。

我遵循了后续步骤。转到Jenkins-> Manage Jenkins转到“ Black Duck Hub”部分,粘贴服务器URL,凭据,当我测试连接时出现错误。

  

com.blackducksoftware.integration.hub.rest.exception.IntegrationRestException:连接错误:401:401   com.blackducksoftware.integration.hub.rest.exception.IntegrationRestException:连接错误:401:401       在com.blackducksoftware.integration.hub.rest.CredentialsRestConnection.clientAuthenticate(CredentialsRestConnection.java:93)       在com.blackducksoftware.integration.hub.rest.RestConnection.connect(RestConnection.java:133)       在com.blackducksoftware.integration.hub.jenkins.PostBuildScanDescriptor.doTestConnection(PostBuildScanDescriptor.java:476)       在java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)       在org.kohsuke.stapler.Function $ MethodFunction.invoke(Function.java:343)       在org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)       在org.kohsuke.stapler.SelectionInterceptedFunction $ Adapter.invoke(SelectionInterceptedFunction.java:36)       在org.kohsuke.stapler.verb.HttpVerbInterceptor.invoke(HttpVerbInterceptor.java:48)       在org.kohsuke.stapler.SelectionInterceptedFunction.bindAndInvoke(SelectionInterceptedFunction.java:26)       在org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)       在org.kohsuke.stapler.MetaClass $ 1.doDispatch(MetaClass.java:129)       在org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)       在org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:734)       在org.kohsuke.stapler.Stapler.invoke(Stapler.java:864)       在org.kohsuke.stapler.MetaClass $ 5.doDispatch(MetaClass.java:248)       在org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)       在org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:734)       在org.kohsuke.stapler.Stapler.invoke(Stapler.java:864)       在org.kohsuke.stapler.Stapler.invoke(Stapler.java:668)       在org.kohsuke.stapler.Stapler.service(Stapler.java:238)       在javax.servlet.http.HttpServlet.service(HttpServlet.java:790)       在org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)       在org.eclipse.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1655)       在hudson.util.PluginServletFilter $ 1.doFilter(PluginServletFilter.java:154)       在hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)       在org.eclipse.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1642)       在hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:64)       在org.eclipse.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1642)       在hudson.security.ChainedServletFilter $ 1.doFilter(ChainedServletFilter.java:84)       在hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)       在hudson.security.ChainedServletFilter $ 1.doFilter(ChainedServletFilter.java:87)       在jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)       在hudson.security.ChainedServletFilter $ 1.doFilter(ChainedServletFilter.java:87)       在org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)处       在hudson.security.ChainedServletFilter $ 1.doFilter(ChainedServletFilter.java:87)       在org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)       在hudson.security.ChainedServletFilter $ 1.doFilter(ChainedServletFilter.java:87)       在org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)       在hudson.security.ChainedServletFilter $ 1.doFilter(ChainedServletFilter.java:87)       在jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)       在hudson.security.ChainedServletFilter $ 1.doFilter(ChainedServletFilter.java:87)       在org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)       在hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)       在hudson.security.ChainedServletFilter $ 1.doFilter(ChainedServletFilter.java:87)       在hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)       在hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)       在org.eclipse.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1642)       在org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)       在org.eclipse.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1642)       在hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)       在org.eclipse.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1642)       在org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)       在org.eclipse.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1642)       在org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)       在org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)       在org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)       在org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)       在org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)       在org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)       在org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)       在org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)       在org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)       在org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)       在org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)       在org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)       在org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)       在org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)       在org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)       在org.eclipse.jetty.server.Server.handle(Server.java:531)       在org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)       在org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)       在org.eclipse.jetty.io.AbstractConnection $ ReadCallback.succeeded(AbstractConnection.java:281)       在org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)       在org.eclipse.jetty.io.ChannelEndPoint $ 2.run(ChannelEndPoint.java:118)       在org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)       在org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)       在org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)       在org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)       在org.eclipse.jetty.util.thread.ReservedThreadExecutor $ ReservedThread.run(ReservedThreadExecutor.java:366)       在winstone.BoundedExecutorService.lambda $ scheduleNext $ 0(BoundedExecutorService.java:80)       在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)       在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)       在java.lang.Thread.run(Thread.java:748)

我该怎么办?

1 个答案:

答案 0 :(得分:0)

错误401表示未经授权的请求。
确保blackduck服务器网址正确(也许是http s ?),并且您的凭据有效(尝试通过blackuck仪表板使用它们登录)