Skip to content
Skip to Content

GitHub and GitHub Enterprise

Connect a github.com or GitHub Enterprise Server account to OpenPanel with a classic or fine-grained personal access token, and which scopes it needs.

A GitHub account reads every repository its token can read. It works with github.com and with GitHub Enterprise Server.

The token

Use either kind of personal access token:

TokenScopes or permissions
Classicrepo and read:user
Fine-grainedRead access to Contents and Metadata, for the repositories you choose
  1. Open github.com/settings/tokens/new?scopes=repo,read:user&description=OpenPanel. The add dialog links to the same page, with the note and the two scopes already filled in.
  2. Choose an expiration.
  3. Check that repo and read:user are ticked, and choose Generate token.
  4. Copy the token. GitHub shows it only once.

The classic repo scope also allows writing to your repositories. OpenPanel only reads; for read-only access, use a fine-grained token.

On GitHub Enterprise Server, make the token on your server's own address: the add dialog links to /settings/tokens/new there once you have typed the address.

Add the account

  1. In Organization settings → Git accounts, choose Add Git account → GitHub.
  2. Address: leave https://github.com, or enter your GitHub Enterprise Server's address.
  3. Paste the token into Personal access token, and choose Add account.

OpenPanel checks the token at once and shows whose it is and how many repositories it reads. If the check fails, nothing is saved.

GitHub Enterprise Server must be reachable from the internet: GitHub accounts cannot be reached through the private network. OpenPanel calls its API at the address you entered, under /api/v3.

If the check fails

The console saysWhat to do
GitHub did not accept the token. Check that it was copied whole and has not expired or been revoked.Copy the token again, whole, or make a new one.
GitHub refused the token for this. It needs: …Give the token the scopes or permissions above.
Nothing answered at …/user. Check the address (GitHub Enterprise Server answers at its own address, with the API under /api/v3).Check the Enterprise Server address.
GitHub is limiting requests from this address. Try again later.Wait, then choose Check again.

When a token expires, the account shows Failed at its next check. Remove the account and add it again with a new token.