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

GitHub branch source plugin does not document what should be used for creds

    Details

    • Similar Issues:

      Description

      Started by user Andrew Bayer
      Consulting GitHub Organization
      Connecting to GitHub using abayer/****** (abayer-github)
      FATAL: Failed to recompute children of Folder Computation
      java.io.IOException: Server returned HTTP response code: 401 for URL: https://api.github.com/orgs/abayer
      	at sun.reflect.GeneratedConstructorAccessor126.newInstance(Unknown Source)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1889)
      	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1884)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1883)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1456)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
      	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
      	at org.kohsuke.github.Requester.parse(Requester.java:458)
      	at org.kohsuke.github.Requester._to(Requester.java:227)
      	at org.kohsuke.github.Requester.to(Requester.java:194)
      	at org.kohsuke.github.GitHub.getOrganization(GitHub.java:310)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:130)
      	at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:124)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:151)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:106)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:408)
      Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://api.github.com/orgs/abayer
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1839)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
      	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
      	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
      	at org.kohsuke.github.Requester.parse(Requester.java:454)
      	... 9 more
      Finished: FAILURE
      

      Credentials are valid username/password, put my user in for the owner, default repository scan, etc.

      When I change to use an access token for the password, it works, but I can't find anywhere where it says to use a username/access token rather than a username/password.

        Attachments

          Issue Links

            Activity

            abayer Andrew Bayer created issue -
            abayer Andrew Bayer made changes -
            Field Original Value New Value
            Environment Jenkins core 1.625.2.0-beta-2, plugin version 1.0.
            recena Manuel Recena Soto made changes -
            Environment Jenkins core 1.625.2.0-beta-2, plugin version 1.0. Jenkins core 1.625.2, plugin version 1.0.
            recena Manuel Recena Soto made changes -
            Environment Jenkins core 1.625.2, plugin version 1.0. Jenkins core 1.625.2, plugin version 1.0
            abayer Andrew Bayer made changes -
            Summary GitHub branch source plugin fails on GitHub user rather than org GitHub branch source plugin does not document what should be used for creds
            Description See https://gist.github.com/abayer/757c08dcd4a41bfbda78 - creds are valid, put my user in for the owner, default repository scan, etc. See https://gist.github.com/abayer/757c08dcd4a41bfbda78 - creds are valid username/password, put my user in for the owner, default repository scan, etc.

            When I change to use an access token for the password, it works, but I can't find anywhere where it says to use a username/access token rather than a username/password.
            Priority Blocker [ 1 ] Major [ 3 ]
            abayer Andrew Bayer made changes -
            Labels diagnostics
            recena Manuel Recena Soto made changes -
            Priority Major [ 3 ] Minor [ 4 ]
            recena Manuel Recena Soto made changes -
            Issue Type Bug [ 1 ] Improvement [ 4 ]
            recena Manuel Recena Soto made changes -
            Description See https://gist.github.com/abayer/757c08dcd4a41bfbda78 - creds are valid username/password, put my user in for the owner, default repository scan, etc.

            When I change to use an access token for the password, it works, but I can't find anywhere where it says to use a username/access token rather than a username/password.
            {noformat}
            Started by user Andrew Bayer
            Consulting GitHub Organization
            Connecting to GitHub using abayer/****** (abayer-github)
            FATAL: Failed to recompute children of Folder Computation
            java.io.IOException: Server returned HTTP response code: 401 for URL: https://api.github.com/orgs/abayer
            at sun.reflect.GeneratedConstructorAccessor126.newInstance(Unknown Source)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
            at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1889)
            at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1884)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1883)
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1456)
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
            at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
            at org.kohsuke.github.Requester.parse(Requester.java:458)
            at org.kohsuke.github.Requester._to(Requester.java:227)
            at org.kohsuke.github.Requester.to(Requester.java:194)
            at org.kohsuke.github.GitHub.getOrganization(GitHub.java:310)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator.visitSources(GitHubSCMNavigator.java:130)
            at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:124)
            at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:151)
            at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:106)
            at hudson.model.ResourceController.execute(ResourceController.java:98)
            at hudson.model.Executor.run(Executor.java:408)
            Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://api.github.com/orgs/abayer
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1839)
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
            at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
            at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
            at org.kohsuke.github.Requester.parse(Requester.java:454)
            ... 9 more
            Finished: FAILURE
            {noformat}

            Credentials are valid username/password, put my user in for the owner, default repository scan, etc.

            When I change to use an access token for the password, it works, but I can't find anywhere where it says to use a username/access token rather than a username/password.
            recena Manuel Recena Soto made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            recena Manuel Recena Soto made changes -
            Remote Link This issue links to "PR (Web Link)" [ 13546 ]
            recena Manuel Recena Soto made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Done [ 10000 ]
            jglick Jesse Glick made changes -
            Link This issue depends on JENKINS-33490 [ JENKINS-33490 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 166999 ] JNJira + In-Review [ 198089 ]

              People

              • Assignee:
                recena Manuel Recena Soto
                Reporter:
                abayer Andrew Bayer
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: