[Blue Ocean] Getting 403 when trying to create pipeline

131 views
Skip to first unread message

Th3Alibi

unread,
Jun 20, 2017, 4:48:45 PM6/20/17
to Jenkins Developers
I am having a hard time using Blue Ocean.  When I add my token and attempt to create a new pipeline, Jenkins logs are showing below stack trace.  This is happening in both standalone jenkins and cloudbees enterprise.  The token is good, I have tested the auth.  We are using an organization account with private repositories on GitHub.

Standalone Jenkins: 2.46.3
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) Client VM (build 25.40-b25, mixed mode)

Cloudbees Enterprise Anywhere:
cje-mm:2.46.3-rolling

Jun 20, 2017 4:00:46 PM io.jenkins.blueocean.blueocean_github_pipeline.GithubPipelineCreateRequest cleanupOnError
SEVERE: Error creating pipeline [ORG_NAME]: {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}
java.io.FileNotFoundException: {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}
        at org.kohsuke.github.Requester.handleApiError(Requester.java:650)
        at org.kohsuke.github.Requester._to(Requester.java:283)
        at org.kohsuke.github.Requester.to(Requester.java:224)
        at org.kohsuke.github.GitHub.checkApiUrlValidity(GitHub.java:668)
        at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.checkApiUrlValidity(GitHubSCMSource.java:501)
        at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:444)
        at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:300)
        at jenkins.scm.api.SCMSource.fetch(SCMSource.java:230)
        at io.jenkins.blueocean.blueocean_github_pipeline.GithubPipelineCreateRequest.repoHasJenkinsFile(GithubPipelineCreateRequest.java:304)
        at io.jenkins.blueocean.blueocean_github_pipeline.GithubPipelineCreateRequest.create(GithubPipelineCreateRequest.java:173)
        at io.jenkins.blueocean.rest.model.BluePipelineContainer.create(BluePipelineContainer.java:48)
        at io.jenkins.blueocean.rest.model.BluePipelineContainer.create(BluePipelineContainer.java:44)
        at java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source)
        at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
        at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
        at org.kohsuke.stapler.SelectionInterceptedFunction$Adapter.invoke(SelectionInterceptedFunction.java:36)
        at org.kohsuke.stapler.verb.HttpVerbInterceptor.invoke(HttpVerbInterceptor.java:48)
        at org.kohsuke.stapler.SelectionInterceptedFunction.bindAndInvoke(SelectionInterceptedFunction.java:26)
        at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
        at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:26)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
        at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:209)
        at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
        at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:374)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
        at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:374)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
        at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:374)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:686)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
        at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:374)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
        at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
        at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
        at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
        at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:51)
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
        at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
        at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at io.jenkins.blueocean.rest.APICrumbExclusion.process(APICrumbExclusion.java:30)
        at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:58)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
        at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
        at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
        at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
        at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:499)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
        at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: https://api.github.com/
        at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:243)
        at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
        at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
        at org.kohsuke.github.Requester.parse(Requester.java:596)
        at org.kohsuke.github.Requester._to(Requester.java:262)
        ... 100 more

Keith Zantow

unread,
Jun 20, 2017, 4:52:08 PM6/20/17
to jenkin...@googlegroups.com
Did you use the link in the Blue Ocean UI to create your token or did you create it manually?


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/21c7b6db-13ce-4abc-8130-772335c0bdd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Th3Alibi

unread,
Jun 22, 2017, 10:15:38 AM6/22/17
to Jenkins Developers
I've tried both.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.

Mike Flynn

unread,
Aug 14, 2017, 2:43:21 AM8/14/17
to Jenkins Developers
Any update on this thread? I'm seeing the exact same error in my jenkins.log when trying to make a pipeline in a repo via the Blue Ocean wizard.

Cliff Meyers

unread,
Aug 16, 2017, 2:43:19 PM8/16/17
to Jenkins Dev List
Hello Mike and Th3Alibi,

If one of you is willing to file a ticket in the Jenkins JIRA with repro steps and cc me via comment, I'll be happy to take a look. 

Thanks,
Cliff

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/2727a583-21a5-4eda-9410-8124168fe991%40googlegroups.com.

James Dumay

unread,
Aug 17, 2017, 2:44:27 AM8/17/17
to Jenkins Developers
You wouldn't be behind a corp HTTP proxy would you? That exception suggests that Blue Ocean can't reach Github.
Reply all
Reply to author
Forward
0 new messages