GitHub and GitHub Enterprise
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:
| Token | Scopes or permissions |
|---|---|
| Classic | repo and read:user |
| Fine-grained | Read access to Contents and Metadata, for the repositories you choose |
- 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.
- Choose an expiration.
- Check that repo and read:user are ticked, and choose Generate token.
- 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
- In Organization settings → Git accounts, choose Add Git account → GitHub.
- Address: leave
https://github.com, or enter your GitHub Enterprise Server's address. - 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 says | What 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.
Git accounts
Connect your organization's GitHub, GitLab, Gitea, Forgejo and Bitbucket accounts, or any Git repository over SSH or HTTPS, and how OpenPanel checks and keeps them.
GitLab
Connect a gitlab.com or self-managed GitLab account to OpenPanel with a personal access token, and which scopes it needs.