[JIRA] (JENKINS-61822) Unable to authorize blueocean with github

45 views
Skip to first unread message

steve@speech-graphics.com (JIRA)

unread,
Apr 6, 2020, 5:36:02 AM4/6/20
to jenkinsc...@googlegroups.com
Steve Parker created an issue
 
Jenkins / Bug JENKINS-61822
Unable to authorize blueocean with github
Issue Type: Bug Bug
Assignee: Unassigned
Components: blueocean-plugin
Created: 2020-04-06 09:35
Environment: Blueocean: 1.22.0
Jenkins: 2.222.1

Running on Amazon linux 2. Issue occuring on both Chrome and Safari
Priority: Blocker Blocker
Reporter: Steve Parker

When trying to create a pipeline with blueocean, I enter my personal access token and choose connect. I get the following logged to console.

 

Unhandled Rejection: "Error: fetch failed: 500 for http://<ip>:8080/blue/rest/organizations/jenkins/scm/github/validate/?apiUrl=https://api.github.com\n at FetchFunctions.checkStatus (http://<ip>:8080/adjuncts/43befe0e/io/jenkins/blueocean/blueocean-core-js.js:54923:25)"

 

Not really sure how to debug this. There is no sign of it in jenkins logs. This only occurs when I enter a valid personal access token. If I enter gibberish, it correctly tells me it's an invalid token.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

iamdarealmc@gmail.com (JIRA)

unread,
Apr 6, 2020, 4:00:03 PM4/6/20
to jenkinsc...@googlegroups.com
Michael McClaren commented on Bug JENKINS-61822
 
Re: Unable to authorize blueocean with github

I am seeing the same issue on a clean install of Jenkins (1.22.0 · Core 2.222.1 · 3c5974d · 28th January 2020 02:17 AM) 

Using a token that has incorrect permissions results in an indication that the permissions are incorrect.

Using a valid token with correct permissions results in this error:

  1. message: "No 'injectableValues' configured, cannot inject value with id [org.kohsuke.github.GitHubResponse$ResponseInfo]↵ at [Source: (String)"{"login":"darealmc","id":xxxxxxxxx,"node_id":"xxxxxxxxx","avatar_url":"https://avatars2.githubusercontent.com/u/xxxxxxx?v=4","gravatar_id":"","url":"https://api.github.com/users/darealmc","html_url":"https://github.com/darealmc","followers_url":"https://api.github.com/users/darealmc/followers","following_url":"https://api.github.com/users/darealmc/following {/other_user}

    ","gists_url":"https://api.github.com/users/darealmc/gists{/gist_id}","starred_url":"https://api.github.com/users/dar"[truncated 636 chars]; line: 1, column: 2]"

  2. code: 500

Using the token on the command line via https the token works correctly. 

iamdarealmc@gmail.com (JIRA)

unread,
Apr 6, 2020, 4:01:02 PM4/6/20
to jenkinsc...@googlegroups.com
Michael McClaren edited a comment on Bug JENKINS-61822
I am seeing the same issue on a clean install of Jenkins / BlueOcean (1.22.0 · Core 2.222.1 · 3c5974d · 28th January 2020 02:17 AM)   Ubuntu 18.04 in Amazon Ec2

Using a token that has incorrect permissions results in an indication that the permissions are incorrect.

Using a valid token with correct permissions results in this error:
# message: "No 'injectableValues' configured, cannot inject value with id [org.kohsuke.github.GitHubResponse$ResponseInfo]↵ at [Source: (String)"\{"login":"darealmc","id":xxxxxxxxx,"node_id":"xxxxxxxxx","avatar_url":"https://avatars2.githubusercontent.com/u/xxxxxxx?v=4","gravatar_id":"","url":"https://api.github.com/users/darealmc","html_url":"https://github.com/darealmc","followers_url":"https://api.github.com/users/darealmc/followers","following_url":"https://api.github.com/users/darealmc/following{/other_user}
","gists_url":"https://api.github.com/users/darealmc/gists\{/gist_id}","starred_url":"https://api.github.com/users/dar"[truncated 636 chars]; line: 1, column: 2]"

# code: 500


Using the token on the command line via https the token works correctly. 

iamdarealmc@gmail.com (JIRA)

unread,
Apr 6, 2020, 6:41:09 PM4/6/20
to jenkinsc...@googlegroups.com

Reloaded a new instance and installed clean.

 

Blue ocean 1.22.0

Jenkins 2.230

Same error in the http response.

 

  1. message: "No 'injectableValues' configured, cannot inject value with id [org.kohsuke.github.GitHubResponse$ResponseInfo]↵ at [Source: (String)"{"login":"darealmc","id":xxxx,"node_id":"xxxx","avatar_url":"https://avatars2.githubusercontent.com/u/43794308?v=4","gravatar_id":"","url":"https://api.github.com/users/darealmc","html_url":"https://github.com/darealmc","followers_url":"https://api.github.com/users/darealmc/followers","following_url":"https://api.github.com/users/darealmc/following {/other_user}
  1. ","gists_url":"https://api.github.com/users/darealmc/gists{/gist_id}","starred_url":"https://api.github.com/users/dar"[truncated 636 chars]; line: 1, column: 2]"

  1. code: 500

 

g.lanciano1@gmail.com (JIRA)

unread,
Apr 7, 2020, 4:10:32 AM4/7/20
to jenkinsc...@googlegroups.com

Michael McClaren Could you please share the cli command that worked for you? Were you able to progress in creating a pipeline once you ran that?
Thanks in advance.

iamdarealmc@gmail.com (JIRA)

unread,
Apr 7, 2020, 9:38:02 AM4/7/20
to jenkinsc...@googlegroups.com

My apologies for the confusion with my choice of terminology. What I should have said is that I validated that the token was correct by using it in bash and running git clone over https using the token. The only place that the token appears to have an issue is in the Blue ocean editor. 

travis.a.smith.ja@gmail.com (JIRA)

unread,
Apr 7, 2020, 4:28:02 PM4/7/20
to jenkinsc...@googlegroups.com

I'm having the same issue here running on the exact same configuration as Michael McClaren.
Ubuntu 18.04 on EC2, Jenkins 2.222.1 and Blue Ocean:  1.22.0.

muhammadali1233@hotmail.com (JIRA)

unread,
Apr 7, 2020, 4:38:03 PM4/7/20
to jenkinsc...@googlegroups.com

I have come across the same issue. I am trying to access Git enterprise and the access token just won't go through. I have been debugging the issue and this is the command that returns that error.

curl -v -u admin:admin -d '{"accessToken": mytoken"}' -H "Content-Type:application/json" -XPUT http://<address>/jenkins/blue/rest/organizations/jenkins/scm/github-enterprise/validate

 

addition note 1: I have been using blueocean for a month now and worked just fine. The setup stopped working just 2-3 days ago.

addition note 2: I have admin access for my git account so no access issue.

ngandriau@gmail.com (JIRA)

unread,
Apr 7, 2020, 4:39:05 PM4/7/20
to jenkinsc...@googlegroups.com

I had the same issue after upgrading my plugins and I downgraded `GitHub API` from `1.110` to `1.106` and it works now.

I am able to create pipeline with blueocean.

Hope that helps

muhammadali1233@hotmail.com (JIRA)

unread,
Apr 7, 2020, 4:59:02 PM4/7/20
to jenkinsc...@googlegroups.com

Dude you made my day. I was really frustrated with this totally random issue. Downgrading github-api did the job.

thanks again!

ales.dolenc@conology.onmicrosoft.com (JIRA)

unread,
Apr 9, 2020, 3:09:03 AM4/9/20
to jenkinsc...@googlegroups.com

I have the same issue as people above, but the downgrade button isn't there. Since I'm running a clean install, and Jenkins installs the latest plugins, the downgrade button isn't there (nothing to downgrade to?). Is there a way to manually downgrade or alternative route to downgrade a plugin?

Thanks in advance.

iamdarealmc@gmail.com (JIRA)

unread,
Apr 9, 2020, 10:34:03 AM4/9/20
to jenkinsc...@googlegroups.com

Grab the previous version of the plugin here

http://updates.jenkins-ci.org/download/plugins/github-api/

then stop jenkins, rename the existing file/directories for this plugin in the plugins folder and place the .hpi file in the folder.

restart jenkins, verify that the plugin manager recognizes the older version, it should now be prompting you to upgrade.

iamdarealmc@gmail.com (JIRA)

unread,
Apr 9, 2020, 10:51:03 AM4/9/20
to jenkinsc...@googlegroups.com
Michael McClaren edited a comment on Bug JENKINS-61822
Grab the previous version of the plugin here

[http://updates.jenkins-ci.org/download/plugins/github-api/]

then stop jenkins, rename the existing file/directories for this plugin in the plugins folder and place the .hpi file in the folder.

restart jenkins, verify that the plugin manager recognizes the older version, it should now be prompting you to upgrade update this plugin . Do not update obviously.

ankitjain28may77@gmail.com (JIRA)

unread,
Apr 11, 2020, 6:01:03 AM4/11/20
to jenkinsc...@googlegroups.com

Hi, I am also facing the same issue, I downgraded to 1.106.

Grab the 1.106. version of the plugin from  

http://updates.jenkins-ci.org/download/plugins/github-api/

Then go to manage plugins > Advance > Upload Plugin and upload the 1.106 plugins and install it. All dependencies and indirect dependencies will also be satisfied with this version.

dnusbaum@cloudbees.com (JIRA)

unread,
Apr 14, 2020, 5:26:04 PM4/14/20
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
Apr 14, 2020, 5:27:03 PM4/14/20
to jenkinsc...@googlegroups.com
Liam Newman updated an issue
 
Change By: Liam Newman
When trying to create a pipeline with blueocean, I enter my personal access token and choose connect. I get the following logged to console.

 

Unhandled Rejection: "Error: fetch failed: 500 for http://<ip>:8080/blue/rest/organizations/jenkins/scm/github/validate/?apiUrl= [ https://api.github.com\n |https://api.github.comn/] at FetchFunctions.checkStatus (http://<ip>:8080/adjuncts/43befe0e/io/jenkins/blueocean/blueocean-core-js.js:54923:25)"


 

Not really sure how to debug this. There is no sign of it in jenkins logs. This only occurs when I enter a valid personal access token. If I enter gibberish, it correctly tells me it's an invalid token.


NOTE FROM MAINTAINER: 

This issue has been filed with the github-api maintainer: [https://github.com/github-api/github-api/issues/780]

Rolling back to github-api 1.106 addresses this issue in the short term. 

 

 

bitwiseman@gmail.com (JIRA)

unread,
Apr 14, 2020, 5:28:02 PM4/14/20
to jenkinsc...@googlegroups.com
Liam Newman updated an issue
NOTE FROM MAINTAINER: 
{quote}This issue has been filed with the github-api maintainer: [https://github.com/github-api/github-api/issues/780]


Rolling back to github-api 1.106 addresses this issue in the short term. 



[http://updates.jenkins-ci.org/download/plugins/github-api/]

Then go to manage plugins > Advance > Upload Plugin and upload the 1.106 plugins and install it. All dependencies and indirect dependencies will also be satisfied with this version.
{quote}
 

When trying to create a pipeline with blueocean, I enter my personal access token and choose connect. I get the following logged to console.

 

Unhandled Rejection: "Error: fetch failed: 500 for http://<ip>:8080/blue/rest/organizations/jenkins/scm/github/validate/?apiUrl=[https://api.github.com\n|https://api.github.comn/] at FetchFunctions.checkStatus (http://<ip>:8080/adjuncts/43befe0e/io/jenkins/blueocean/blueocean-core-js.js:54923:25)"

 

Not really sure how to debug this. There is no sign of it in jenkins logs. This only occurs when I enter a valid personal access token. If I enter gibberish, it correctly tells me it's an invalid token.

NOTE FROM MAINTAINER:  

This issue has been filed with the github-api maintainer:   [https://github.com/github-api/github-api/issues/780]

Rolling back to github-api 1.106 addresses this issue in the short term.  

 

 

bitwiseman@gmail.com (JIRA)

unread,
Apr 16, 2020, 4:37:04 PM4/16/20
to jenkinsc...@googlegroups.com
Liam Newman assigned an issue to Liam Newman
Change By: Liam Newman
Assignee: Liam Newman

bitwiseman@gmail.com (JIRA)

unread,
Apr 16, 2020, 4:38:03 PM4/16/20
to jenkinsc...@googlegroups.com
Liam Newman commented on Bug JENKINS-61822
 
Re: Unable to authorize blueocean with github

There is a new version of github-api and blueocean coming shortly.  

bitwiseman@gmail.com (JIRA)

unread,
Apr 20, 2020, 6:16:03 PM4/20/20
to jenkinsc...@googlegroups.com
Liam Newman resolved as Fixed
 

Fixed in Blue Ocean 1.23.0

Change By: Liam Newman
Status: Open Resolved
Resolution: Fixed
Released As: 1.23.0
Reply all
Reply to author
Forward
0 new messages