Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61822

Unable to authorize blueocean with github

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: blueocean-plugin
    • Labels:
      None
    • Environment:
      Blueocean: 1.22.0
      Jenkins: 2.222.1

      Running on Amazon linux 2. Issue occuring on both Chrome and Safari
    • Similar Issues:
    • Released As:
      1.23.0

      Description

      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. 

      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.

       

      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.

       

       

       

        Attachments

          Issue Links

            Activity

            stevepkr84 Steve Parker created issue -
            Hide
            darealmc Michael McClaren added a comment - - edited

            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:

            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]"

            1. code: 500

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

            Show
            darealmc Michael McClaren added a comment - - edited 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. 
            Hide
            darealmc Michael McClaren added a comment -

            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}

              ","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

             

            Show
            darealmc Michael McClaren added a comment - Reloaded a new instance and installed clean.   Blue ocean 1.22.0 Jenkins 2.230 Same error in the http response.   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} ","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  
            Hide
            jak_ Giacomo Lanciano added a comment -

            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.

            Show
            jak_ Giacomo Lanciano added a comment - 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.
            Hide
            darealmc Michael McClaren added a comment -

            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. 

            Show
            darealmc Michael McClaren added a comment - 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. 
            Hide
            smithtal Travis Smith added a comment -

            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.

            Show
            smithtal Travis Smith added a comment - 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.
            Hide
            muhammadali1233 muhammad ali added a comment -

            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.

            Show
            muhammadali1233 muhammad ali added a comment - 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.
            Hide
            ngandriau Nicolas GANDRIAU added a comment -

            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

            Show
            ngandriau Nicolas GANDRIAU added a comment - 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
            Hide
            muhammadali1233 muhammad ali added a comment -

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

            thanks again!

            Show
            muhammadali1233 muhammad ali added a comment - Dude you made my day. I was really frustrated with this totally random issue. Downgrading github-api did the job. thanks again!
            Hide
            chasinglosses Aleš Dolenc added a comment -

            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.

            Show
            chasinglosses Aleš Dolenc added a comment - 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.
            Hide
            darealmc Michael McClaren added a comment - - edited

            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 update this plugin. Do not update obviously.

            Show
            darealmc Michael McClaren added a comment - - edited 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 update this plugin. Do not update obviously.
            Hide
            ankitjain28may Ankit Jain added a comment -

            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.

            Show
            ankitjain28may Ankit Jain added a comment - 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.
            Hide
            dnusbaum Devin Nusbaum added a comment -

            See https://github.com/github-api/github-api/issues/780 for additional discussion.

            Show
            dnusbaum Devin Nusbaum added a comment - See  https://github.com/github-api/github-api/issues/780  for additional discussion.
            dnusbaum Devin Nusbaum made changes -
            Field Original Value New Value
            Remote Link This issue links to "github-api/github-api Issue #780 (Web Link)" [ 24845 ]
            bitwiseman Liam Newman made changes -
            Description 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://&lt;ip&gt;:8080/blue/rest/organizations/jenkins/scm/github/validate/?apiUrl=https://api.github.com\n at FetchFunctions.checkStatus (http://&lt;ip&gt;: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.
            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://&lt;ip&gt;:8080/blue/rest/organizations/jenkins/scm/github/validate/?apiUrl=[https://api.github.com\n|https://api.github.comn/] at FetchFunctions.checkStatus (http://&lt;ip&gt;: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 Liam Newman made changes -
            Description 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://&lt;ip&gt;:8080/blue/rest/organizations/jenkins/scm/github/validate/?apiUrl=[https://api.github.com\n|https://api.github.comn/] at FetchFunctions.checkStatus (http://&lt;ip&gt;: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. 

             

             
            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. 

            Grab the [1.106|http://updates.jenkins-ci.org/download/plugins/github-api/1.106/github-api.hpi]. 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.
            {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://&lt;ip&gt;:8080/blue/rest/organizations/jenkins/scm/github/validate/?apiUrl=[https://api.github.com\n|https://api.github.comn/] at FetchFunctions.checkStatus (http://&lt;ip&gt;: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.

             

             

             
            bitwiseman Liam Newman made changes -
            Assignee Liam Newman [ bitwiseman ]
            Hide
            bitwiseman Liam Newman added a comment -

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

            Show
            bitwiseman Liam Newman added a comment - There is a new version of github-api and blueocean coming shortly.  
            Hide
            bitwiseman Liam Newman added a comment -

            Fixed in Blue Ocean 1.23.0

            Show
            bitwiseman Liam Newman added a comment - Fixed in Blue Ocean 1.23.0
            bitwiseman Liam Newman made changes -
            Released As 1.23.0
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]

              People

              Assignee:
              bitwiseman Liam Newman
              Reporter:
              stevepkr84 Steve Parker
              Votes:
              6 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: