How to Create a Self-Hosted GitHub App
If you are using Bencher Cloud, then you can simply sign up or log in
using the GitHub
button.
For Bencher Self-Hosted, you will need to have a Bencher Plus Enterprise plan, create your own GitHub App, and update your console server configuration and API sever configuration.
Create a GitHub App
- Create a GitHub App
- GitHub App name
- Choose an unique name (ex:
Bencher for My Enterprise
)
- Choose an unique name (ex:
- Homepage URL
- Set it to your Bencher Self-Hosted Console URL (ex:
https://bencher.example.com
)
- Set it to your Bencher Self-Hosted Console URL (ex:
- Identifying and authorizing users
- Callback URL
- Set the callback URL to your Bencher Self-Hosted Console URL with the path
/auth/github
(ex:https://bencher.example.com/auth/github
)
- Set the callback URL to your Bencher Self-Hosted Console URL with the path
- ✅ Expire user authorization tokens
- ✅ Request user authorization (OAuth) during installation
- ✅ Enable Device Flow
- Callback URL
- Webhook
- ❌ Active - Uncheck this box
- Permissions
- Account permissions
- Email addresses:
Read-only
- Email addresses:
- Account permissions
- Where can this GitHub App be installed?
- 🔘 Any account
- Click
Create GitHub App
- Now under
General
for the newly created app - Note the
Client ID
(ex:Iv1.12864abcd1232048
) - Client secrets
- Click
Generate a new client secret
- Note this secret (ex:
00000abcd12345wxyz123456789abcdefgh0000
)
- Click
- Add the Bencher logo PNG under Display information
- Private keys
- Click
Generate a private key
- Click
GitHub App Configuration
Console UI
Set the GITHUB_CLIENT_ID
environment variable when you run the bencher-console
Docker image. (ex: GITHUB_CLIENT_ID=Iv1.12864abcd1232048
) If the Client ID is missing, then the GitHub buttons will not appear in the UI.
API Server
Add the client_id
and client_secret
to the plus.github
section of the server config. If the GitHub section is missing, then the server will fail any GitHub authentication requests.
🐰 Congrats! You have learned how to setup a GitHub App! 🎉