Create a GitHub personal access token
You will need a personal access token to use the plugin. GitHub currently supports two types of personal access tokens:
- fine-grained personal access tokens
- personal access tokens (classic)
Read more about personal access tokens.
The Grafana GitHub data source plugin works with both. Below is a table that indicates what minimum requirements must be matched before the plugin can be used.
Options:
Setting | Required | Description |
---|---|---|
Access token | true | This is required to allow plugin to connect to GitHub |
GitHub Enterprise URL | false | Only if you are using GitHub Enterprise account |
Creating a personal access token (classic)
This is an example when you want to use the personal access token (classic).
- Login to your GitHub account.
- Navigate to Personal access tokens and click Generate new token.
- Select the personal access token (classic).
- Define the permissions which you want to allow.
- Click Generate Token.
Permissions
You will need to define the access permissions for your token in order to allow it to access the data.
The following lists include the required permissions for the access token:
For all repositories:
public_repo
repo:status
repo_deployment
read:packages
read:user
user:email
For GitHub projects:
read:org
read:project
An extra setting is required for private repositories:
repo (Full control of private repositories)