Add Git Provider
Bytebase supports following Git Providers:
- GitHub.com
- GitHub Enterprise
- GitLab.com
- Self-host GitLab
- Bitbucket.org
- Azure DevOps
Prerequisites
- You must be the Workspace Admin to add Git provider.
- Configure External URL.
- You may also need the help of the selected Git provider admin to create the dedicated service user and the personal access token.
Overview
All providers share a similar setup:
- Create a dedicated service user.
- Obtain the service user credential such as personal access token with the required repository permissions:
- Create Webhook. Bytebase creates a webhook in the repository to observe the merge event.
- Read Repository. Bytebase reads the repository migration file to get the change statements.
- Write Comment. Bytebase may add a comment to the merge request.
Follow the instructions on the Git provider setup page. Below are the screenshots showing the required permissions/scopes.
GitHub.com and GitHub Enterprise (self-host)
GitLab.com and GitLab (self-host)
You can either create:
-
A personal access token, and make sure it has access to the project:
-
A project access token, you'll need at least
Maintainer
role:
Bitbucket.org
Azure DevOps
Pay attention to the Organization field, it has to be All accessible organizations
, not a specific organization.