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

GitHub Branch Source lists all repositories of myself rather than just those I am an owner of

XMLWordPrintable

      If I select a repository that I am not an owner of, then you get a nice error like:

      Started
      [Mon Jul 17 12:59:45 UTC 2017] Starting branch indexing...
      12:59:46 Connecting to https://api.github.com using stephenc/****** (GitHub Personal Access Token)
      ERROR: [Mon Jul 17 12:59:46 UTC 2017] Could not update folder level actions from source ff158f95-2e66-4a9f-942d-409f165aa1da
      hudson.AbortException: Invalid scan credentials when using stephenc/****** (GitHub Personal Access Token) to connect to stephenc/newrelic-deployment-notifier-plugin on https://api.github.com
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieveActions(GitHubSCMSource.java:1216)
      	at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:746)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:587)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:266)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:162)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:969)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:405)
      [Mon Jul 17 12:59:46 UTC 2017] Finished branch indexing. Indexing took 0.48 sec
      FATAL: Invalid scan credentials when using stephenc/****** (GitHub Personal Access Token) to connect to stephenc/newrelic-deployment-notifier-plugin on https://api.github.com
      Finished: FAILURE

      So there is no risk of regression from fixing the drop-down to only return repositories for which myself is an owner.

       

      This bug has been present since the initial release of the plugin:

      https://github.com/jenkinsci/github-branch-source-plugin/blob/d748ec46ab10f134a3cb6b6a65ba3596b0386e7e/src/main/java/org/jenkinsci/plugins/github/multibranch/AbstractGitHubSCMSource.java#L317-L322

            stephenconnolly Stephen Connolly
            stephenconnolly Stephen Connolly
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: