我安装了Jenkins,下载Black Duck Hub插件(v 4.0.1)。
我跟着接下来的步骤。转到Jenkins - >管理Jenkins转到Black Duck Hub部分,粘贴服务器URL,凭据,当我测试连接时出错。
com.blackducksoftware.integration.hub.rest.exception.IntegrationRestException:Connection错误:401:401 com.blackducksoftware.integration.hub.rest.exception.IntegrationRestException:连接错误:401:401 at com.blackducksoftware.integration.hub.rest com.blackducksoftware.integration.hub.rest.RestConnection.connect(RestConnection.java:133)中的.CredentialsRestConnection.clientAuthenticate(CredentialsRestConnection.java:93)at com.blackducksoftware.integration.hub.jenkins.PostBuildScanDescriptor.doTestConnection(PostBuildScanDescriptor.java) :476)位于org.kohsuke.stapler.Function.bindAndInvoke的org.kohsuke.stapler.Function $ MethodFunction.invoke(Function.java:343)的java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) Function.java:184)在org.kohsuke.stapler.SelectionInterceptedFunction $ Adapter.invoke(SelectionInterceptedFunction.java:36)在org.kohsuke.stapler.verb.HttpVerbInterceptor.invoke(HttpVerbInterceptor.java:48)在org.kohsuke.stapler .SelectionInterce位于org.kohsuke的org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)的ptedFunction.bindAndInvoke(SelectionInterceptedFunction.java:26)org.kohsuke.stapler.MetaClass $ 1.doDispatch(MetaClass.java:129)。在org.kohsuke的org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:734)org.kohsuke的org.kohsuke.stapler.Stapler.invoke(Stapler.java:864)上的stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) .stapler.MetaClass $ 5.doDispatch(MetaClass.java:248)在org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)在org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:734)在组织.kohsuke.stapler.Stapler.invoke(Stapler.java:864)org.kohsuke.stapler.Stapler.invoke(Stapler.java:668)atg.kohsuke.stapler.Stapler.service(Stapler.java:238)at at 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)位于org.eclipse.jetty.servlet.ServletHandler $ CachedChain.doFilter的hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157) (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)位于judkins.security.SecurityTranslationFilter.doFilter的hudson.security.security.ChainedServletFilter $ 1.doFilter(ChainedServletFilter.java:87)的hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) (ExceptionTranslationFilter.java:117)hudson.security.ChainedServilFilter $ 1.doFilter $ 1.doFilter(ChainedServletFilter.java:87)位于org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)的hudson.security.ChainedServletFilter $ 1。自由度ilter(ChainedServletFilter.java:87)位于org.acegisecurity.ui的hudson.security.ChainedServletFilter $ 1.doFilter(ChainedServletFilter.java:87)的org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)。位于hudson.security.ChainedServileFilter $ 1.doFilter的jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)的hudson.security.ChainedServletFilter $ 1.doFilter(ChainedServletFilter.java:87)中的AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) (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)at hudson.security.HudsonFilter.doFilter(HudsonFi) lter.java:171)org.eclipse.servty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1642)org.eclipse上的org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)位于org.eclipse.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java)的hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82).jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1642) :1642)在org.eclipse.jetty.servlet上的org.eclipse.jetty.servlet.ServletHandler $ CachedChain.doFilter(ServletHandler.java:1642)的org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)。 ServletHandler.doHandle(ServletHandler.java:533)位于org.eclipse.jetty.sese.SecurityHandler.handle(SecurityHandler.java:524)的org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)在org.eclipse.jetty.server.handler的org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) .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上的org.eclipse.jetty.server.hand.ContextHandler.doHandle(ContextHandler.java:1317)org.eclipse.jet.server.hand.ScopedHandler.nextScope(ScopedHandler.java:203)。位于org.eclipse.jetty.server.hand.cope.hand.上的org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)的jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) ScopedHandler.java:201)atg.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)at org位于org.eclipse.jetty.server.HttpChannel.handle的org.eclipse.jetty.server.Server.handle(Server.java:531)的.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) (HttpChan nel.java:352)在org.eclipse上的org.eclipse.jetty.AffpConnection.onFillable(HttpConnection.java:260)org.eclipse.jetty.io.AbstractConnection $ ReadCallback.succeeded(AbstractConnection.java:281) .jetty.io.FillInterest.fillable(FillInterest.java:102)org.eclipse.jetty.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) at winstone.BoundedExecutorService.lambda $ scheduleNext $ 0(BoundedExecutorService.java:80)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.Thread java.lang.Thread.run中的PoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)(Thread.java:748)
我该怎么办?
错误401表示未经授权的请求。 确保blackduck服务器URL正确(可能是https?)并且您的凭据正在运行(尝试通过黑鸭仪表板使用它们登录)