Setup Git Access Token¶
This page shows how to set up a Git Access Token for your deployments.
The Git Access Token is used to authenticate with your Git provider (GitHub, GitLab, Bitbucket, etc.) and to clone or fetch your repositories via HTTP.
Usage without Git Access Token
You can use doco-cd without a Git Access Token if the repositories you want to use for your deployments are publicly accessible. However, it is still recommended to use one in that case to for example avoid rate limits.
About Git Authentication
See Git Authentication for more information on how doco-cd handles Git authentication and how to set up global and per-domain credentials.
Using GitHub Apps
If you use GitHub, you can also authenticate using a GitHub App.
Git Providers¶
You can either use a Personal Access Token (PAT) or a GitHub App.
See the GitHub docs for Personal Access Token (Classic).
The minimum required scope is repo
See the GitHub docs for Fine-grained tokens.
- Repository access
- Set to
Public Repositories (read-only)for only public repositories. - Set to
All Repositoriesfor all repositories.
- Set to
- The minimum required permissions are:
Contents->Read-onlyMetadata->Read-only
GitHub Apps are supported natively in Doco-CD.
See the GitHub docs for registering a GitHub Apps.
- The minimum required permissions are:
Repository contents->Read-onlyRepository metadata->Read-only
- Go to your user settings.
- Click on
Applications. - Under
Generate New Token:- Fill in the
Token Namefield. - Set
Repository and Organization AccesstoAll - Open
Select Permissionsand setrepositorytoRead - Click on
Generate Tokenand save the token that is shown on the top of the page.
- Fill in the
You can either use a personal access token, a group access token or a project access token for Gitlab.
Which token to use?
Recommended are personal or group access tokens, as they can be used for multiple projects/repositories.
How to create an access token?
See the Gitlab docs for
Token Permissions
- The role
Reporteris sufficient (if asked). - The minimum required scope is
read_repository.
- Follow the official Microsoft documentation to create a Personal Access Token (PAT).