To my understanding currently the github-branch-source plugins always requires GitHub user credentials / tokens to authenticate.

      I'd suggest to add authenticating Jenkins to GitHub as a GitHub App too.

      Why is this better than the current way:

      • GitHub Apps can be granted very fine grained permissions
      • GitHub Apps can be added either to a whole org, or just to selected repos
      • The app uses a key pair to then get temporary credentials, so leaked creds to user are only valid for a short period of time
      • Higher API limits! (probably the most important one for bigger orgs)

      This is specifically NOT about authenticating users against GitHub, but for Authenticating Jenkins itself against GitHub

      References: https://developer.github.com/apps/differences-between-apps/

          [JENKINS-57351] Support for making Jenkins a "GitHub App"

          Andreas Sieferlinger created issue -
          Liam Newman made changes -
          Summary Original: Support authentication as GitHub App New: Support for making Jenkins a "GitHub App"
          Tim Jacomb made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Tim Jacomb made changes -
          Assignee New: Tim Jacomb [ timja ]
          Tim Jacomb made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Jesse Glick made changes -
          Released As New: 2.6.1 or later
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Fixed but Unreleased [ 10203 ]
          Jesse Glick made changes -
          Released As Original: 2.6.1 or later New: 2.7.0
          Jesse Glick made changes -
          Remote Link New: This issue links to "jenkins.io #2988 (Web Link)" [ 24742 ]
          Jesse Glick made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          Jesse Glick made changes -
          Status Original: Fixed but Unreleased [ 10203 ] New: Resolved [ 5 ]

            timja Tim Jacomb
            webrat Andreas Sieferlinger
            Votes:
            13 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved: