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

Github Branch Source Plugin always references https://api.github.com

    Details

    • Similar Issues:
    • Released As:
      github-branch-source-2.5.6

      Description

      Lost ability to choose self hosted github enterprise api URL (API endpoint field) in version 2.5.5.

      Expect to be able to set "API endpoint" (apiURL in the config.xml) to company's git enterprise api url via the project setup.  In version 2.5.5 apiURL is always set to https://api.github.com

      I'm able to work around this problem by cloning existing projects.   However, making a new project does not allow me to choose our locally host github enterprise server (the API endpoint field is gone in 2.5.5) so the project fails on repository scan since it's pointed to https://api.github.com by default instead of [https://git.company.com/api/v3

      StartedStarted[Thu Aug 08 10:52:57 EDT 2019] Starting branch indexing...ERROR: [Thu Aug 08 10:52:57 EDT 2019] Could not update folder level actions from source 27a03b35-22a6-4d0c-a9f6-bc0dceb6e97bhudson.AbortException: Invalid scan credentials BUSINESS_USER/****** (BUSINESS_USER_PASS_AS_TOKEN) to connect to https://api.github.com, skipping at org.jenkinsci.plugins.github_branch_source.Connector.checkConnectionValidity(Connector.java:553) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieveActions(GitHubSCMSource.java:1874) at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:848) at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:592) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277) at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:164) at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1026) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)[Thu Aug 08 10:52:57 EDT 2019] Finished branch indexing. Indexing took 66 msFATAL: Invalid scan credentials BUSINESS_USER/****** (BUSINESS_USER_PASS_AS_TOKEN) to connect to https://api.github.com, skippingFinished: FAILURE|https://git.company.com/api/v3]

       

        Attachments

          Activity

          Hide
          kshultz Karl Shultz added a comment -

          Thanks, William Gillaspy. This is very helpful.

          The credentials thing is something I noticed as well. That might be a distinct problem from what you originally reported. Both are legit and need to be addresed, so thank you for the detailed report. We'll keep you updated here on this ticket.

          Show
          kshultz Karl Shultz added a comment - Thanks, William Gillaspy . This is very helpful. The credentials thing is something I noticed as well. That might be a distinct problem from what you originally reported. Both are legit and need to be addresed, so thank you for the detailed report. We'll keep you updated here on this ticket.
          Hide
          kshultz Karl Shultz added a comment -

          William Gillaspy - I think that between me and Devin Nusbaum, we've got this figured out. Just know that the weird Invalid credentials red text that you see when you supply your (perfectly valid) credentials is still going to be there. The "Validate" button, however, will work fine. The Invalid credentials thing should probably be handled in a separate JIRA.

          Show
          kshultz Karl Shultz added a comment - William Gillaspy - I think that between me and Devin Nusbaum , we've got this figured out. Just know that the weird Invalid credentials red text that you see when you supply your (perfectly valid) credentials is still going to be there. The "Validate" button, however, will work fine. The Invalid credentials thing should probably be handled in a separate JIRA.
          Hide
          kshultz Karl Shultz added a comment -

          There's a PR up now. William Gillaspy, the PR info includes some of the manual testing I've done to make sure things work okay with GitHub Enterprise. I tested both multibranch pipeline and organization folder style jobs, and both are configuring the apiUri field in each job's config.xml in the correct way.

          Once the PR is through review, I'll move this to Done, and we'll follow the usual release process.

          Thanks for reporting this!

          Show
          kshultz Karl Shultz added a comment - There's a PR up now . William Gillaspy , the PR info includes some of the manual testing I've done to make sure things work okay with GitHub Enterprise. I tested both multibranch pipeline and organization folder style jobs, and both are configuring the apiUri field in each job's config.xml in the correct way. Once the PR is through review, I'll move this to Done, and we'll follow the usual release process. Thanks for reporting this!
          Hide
          kshultz Karl Shultz added a comment -

          The above mentioned pull request has been merged and released as GitHub Branch Source 2.5.6.

          Show
          kshultz Karl Shultz added a comment - The above mentioned pull request has been merged and released as GitHub Branch Source 2.5.6 .
          Hide
          wgillaspy William Gillaspy added a comment -

          Looks good.  Thanks for the help!

          Show
          wgillaspy William Gillaspy added a comment - Looks good.  Thanks for the help!

            People

            • Assignee:
              kshultz Karl Shultz
              Reporter:
              wgillaspy William Gillaspy
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: