Jenkins PAT Credentials - johnttaylor/epc GitHub Wiki

Create a Personal Access Token (PAT) in GitHub

  1. Login into the GitHub account

  2. Go to Settings under the account

  3. Select Developer Settings

    image

  4. Select Token (classic)

    image

  5. Select Generate new token->Generate new token (classic)

    image

  6. Create the token. You will be required to select an expiration time for the new PAT. For the Jenkins Server - no-expiration was selected. Review the list to below to for what scope the PAT needs. The bolded items are the scope selections for the Jenkins server.

    • admin:repo_hook - For managing hooks at GitHub Repositories level including for Multibranch Pipeline
    • admin:org_hook - For managing hooks at GitHub Organizations level for GitHub Organization Folders
    • repo - to see private repos. Please note that this is a parent scope, allowing full control of private repositories that includes:
      • repo:status - to manipulate commit statuses
      • repo:repo_deployment - to manipulate deployment statuses
      • repo:public_repo - to access to public repositories
      • read:org and user:email - recommended minimum for GitHub Authentication plugin scopes.

    image

Create Jenkins Credential for the PAT Token

  1. Select Manage Jenkins

  2. Select Credentials

  3. Click System

  4. Click Global credentials (unrestricted)

  5. Click Add Credentials

  6. Select Secret Text, provide a Description, enter the PAT Token into the Secret field, and then press the Create button