Skip to content

Setup Git Access Token

This page shows how to set up a Git Access Token for your deployments.

Info

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.

Tip

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.

If you set a Git Access Token, doco-cd will always use it to authenticate with your Git provider.

Git Providers

You can either use a Personal Access Token (PAT) or a GitHub App.

How to create an access token

See the GitHub docs for

Permissions

  • The minimum required scope is repo
  • Repository access
    • Set to Public Repositories (read-only) for only public repositories.
    • Set to All Repositories for all repositories.
  • The minimum required permissions are:
    • Contents -> Read-only
    • Metadata -> Read-only
  1. Go to your user settings.
  2. Click on Applications.
  3. Under Generate New Token:
    1. Fill in the Token Name field.
    2. Set Repository and Organization Access to All
    3. Open Select Permissions and set repository to Read
    4. Click on Generate Token and save the token that is shown on the top of the page.

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 Reporter is sufficient (if asked).
  • The minimum required scope is read_repository.