Menu
Open source Enterprise Grafana Cloud

Create a GitHub access token

You will need either a GitHub App or a Personal Access Token to use this plugin.

Creating a personal access token (classic)

This is an example when you want to use the personal access token (classic).
Read more about personal access tokens.

  1. Login to your GitHub account.
  2. Navigate to Personal access tokens and click Generate new token.
  3. Select the personal access token (classic).
  4. Define the permissions which you want to allow.
  5. Click Generate Token.

Using GitHub App Authentication

You can also authenticate using a GitHub App instead of a personal access token. This method allows for better security and fine-grained access to resources.

  1. Register a new GitHub App by following the instructions in the GitHub App documentation.
  2. After registering the App, generate a private key for authentication.
  3. Note down the App ID assigned to your GitHub App.
  4. Install the GitHub App on your GitHub account or organization.
  5. Note the installation ID after completing the installation.
  6. In Grafana’s data source settings, provide the app id, installation id, and private key in the appropriate fields.

Where to find your installation id?
Head over to Settings > Installed GitHub Apps > Configure. The installation ID can be found at the end of the URL https://github.com/settings/installations/<installation_id>.

Permissions

You will need to define the access permissions for your personal access token in order to allow it to access the data.

The following lists include the required permissions for the access token:

public_repo, repo:status, repo_deployment, read:packages, read:user, user:email, read:org, read:project, repo (For full control of private repositories)

You will need to define the access permissions for your GitHub App in order to allow it to access the data.

Repositories:

metadata: read-only, contents: read-only, issues: read-only, pull requests: read-only, packages: read-only, repository security advisories: read-only, projects: read-only