Creating a personal access token in GitHub
To create a personal access token for Jenkins to access the microservice projects in GitHub:
- In a web browser, log in to GitHub or GitHub Enterprise with the user account that Jenkins needs to access GitHub. Typically, this is a system or build identity, but can be your personal account for testing purposes.
- Access your personal settings by clicking on your user icon, and then click Settings.
- For public GitHub, click Developer settings>Personal access tokens. For GitHub Enterprise, click Personal access tokens.
- Click Generate new token.
- In the Token description field, describe the purpose of the token.
- Add the
admin:org_hook scopes. Note that for private repos, you must ensure that the repo is selected, and not just the sub options
- Click Generate token, but leave the window open.
- Important: Copy and save your token. You have access only once to the GitHub personal access token.