> ## Documentation Index
> Fetch the complete documentation index at: https://fossa.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GitLab PAT Token

> Generate the GitLab Personal Access Token Fossy needs to read your repositories and post review comments, with the exact scopes required.

## Introduction to the PAT

To enable Fossy to perform automatic Code Reviews, you need to generate a Personal Access Token (PAT) in GitLab. This token allows Fossy to securely access your repositories and conduct code analysis in a controlled way.

## Generating the PAT (Personal Access Token)

Follow these steps to set up the token correctly:

1. **Access GitLab and go to your profile settings**:

   * [Click here to access the profile settings page](https://gitlab.com/-/user_settings/personal_access_tokens).

2. **Navigate to `Access Tokens`**:

   * In the left sidebar, scroll to find `Access Tokens` and click on it.

3. **Add a new token**:

   * Click on the `Add new token` button.

4. **Set up the new token with the following specifications**:

   * **Token Name**: Choose an easily identifiable name, such as `fossy_code_review`.
   * **Expiration Date**: If possible, select a long expiration date, preferably at least 180 days.
   * **Permissions**: Set the following permissions:
     * **api**: Read access.
     * **read\_api**: Read access.
     * **read\_user**: Read access.
     * **read\_repository**: Read access.
     * **write\_repository**: Read access.

5. **Finalize and save the token**:
   * After configuring the permissions, click `Generate token`.
   * Make sure to copy the generated token and store it securely, as you’ll need it to configure Fossy.

## Adding the Token to Fossy

After generating the token, paste it into the Fossy automation setup screen. The configuration modal will open automatically when you attempt to enable the automation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.