Skip to main content

Overview

This guide explains how to generate a Personal Access Token (PAT) in GitLab for securely integrating your repositories with DeepTraQ or other external tools. Personal access tokens allow applications to authenticate with GitLab APIs and repositories without exposing your account password.

Using personal access tokens helps improve security and automation by enabling:

  • Controlled API access
  • Secure authentication for integrations
  • Repository access without sharing credentials
  • Automated workflows and CI/CD integrations

Follow the steps below to create a personal access token in GitLab.

Supported Platforms

  • GitLab repositories

Prerequisites

  • A GitLab account with access to the required repositories
  • Permission to access User Settings in GitLab
  • Repository access to the projects you intend to integrate

Steps

  1. Sign in to your GitLab account.

  2. Open your user menu from the top-right corner of the interface.

  3. Navigate to Preferences or Profile Settings.

  4. Locate the Access Tokens section within the settings.

  5. Click Create new personal access token.

  6. Provide a name for the token so it can be easily identified later.

  7. Configure the required scopes and permissions for your integration.

  8. Select the appropriate access scopes such as:

    • read_user to allow applications to retrieve your basic profile information.
    • read_repository to allow tools to access private project repositories.
    • read_api to provide read access to projects, registries, and packages through the API.
    • write_repository to enable integrations to push changes to repositories.
    • api for full API access and automation capabilities across your GitLab environment.
  9. Click Create personal access token.

  10. Copy the generated token immediately and store it securely.
    GitLab displays the token only once for security reasons.

Field Reference

FieldDescriptionExample
Token NameIdentifies the purpose of the tokenDeepTraQ Integration Token
ScopesDefines the permissions granted to the tokenread_user, read_repository
read_userAllows applications to access basic user profile informationEnabled
read_repositoryAllows read access to private repositoriesEnabled
read_apiProvides read access across projects and packages via APIEnabled
write_repositoryAllows integrations to push changes to repositoriesEnabled
apiGrants full API access across GitLab servicesEnabled