Docs

GitLab Integration

Learn how to integrate GitLab with Cokpit

GitLab Credentials

Step 1: Create Access Token on GitLab

Example: Personal Access Token

  1. Go to GitLab → User Settings → Access Tokens.

  2. Give your token a name under Token name.

  3. Set an expiration date (recommended).

  4. Select the required scopes:

    • api (Full API access)
    • read_repository (Read repository content)
    • write_repository (Write to repositories)
  5. Click Create personal access token.

  6. Copy your token immediately.

💡 Tip: Save your access token securely. You won't be able to see it again!

Step 2: Add GitLab Credentials to Cokpit

  1. Open Cokpit and go to Integrations → Version Control → GitLab.
  1. Click Add secret.
  2. Fill in the required fields:
    • Enter a unique Secret Name
    • Enter your GitLab Username
    • Paste your Access Token
    • Enter your GitLab Email
  3. Click Submit.

Security Best Practices

  • Create tokens with minimal required scopes
  • Set an expiration date for your tokens
  • Use different tokens for different applications
  • Enable two-factor authentication on GitLab
  • Regularly review and revoke unused tokens