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

# GitLab

> Index repositories and issues from GitLab

## How it works

The GitLab Connector picks up all of the Merge Requests and Issues in a specified repository.

* It will index both Open and Closed MRs. This includes the Title and Summary.
* It will index Issues (and Incidents) including comments both Open and Closed.
* Includes certain other metadata such as the URL, creator, etc.

## Setting up

### Authorization

<Steps>
  <Step title="Use GitLab Access Token">
    This Connector uses a GitLab Access Token.
  </Step>

  <Step title="Create personal access token">
    Log in to GitLab. On the left sidebar, select your avatar. Select Edit **profile**. Select **Add new token**.

    <img className="rounded-image" src="https://mintcdn.com/danswer/24Ocig51qMqahMaT/assets/admins/connectors/gitlab/GitlabConnectorAuth.gif?s=8b810663dd2fe4f92d72541c5d88623c" alt="Creating a GitLab personal access token with required scopes" width="2444" height="1462" data-path="assets/admins/connectors/gitlab/GitlabConnectorAuth.gif" />
  </Step>

  <Step title="Set token details">
    Enter a name and expiry date for the token.

    * The token expires on that date at midnight UTC.
    * If you do not enter an expiry date,
      the expiry date is automatically set to 365 days later than the current date.
    * By default, this date can be a maximum of 365 days later than the current date.
  </Step>

  <Step title="Select scopes and create">
    Select the desired scopes,
    further details
    [here](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#personal-access-token-scopes).
    Then select **Create personal access token**.
  </Step>
</Steps>

### Indexing

<Steps>
  <Step title="Open GitLab connector">
    Navigate to the Admin Panel and select the **GitLab** Connector
  </Step>

  <Step title="Confirm GitLab URL">
    If you're using GitLab Cloud and not self-hosting, keep the GitLab URL as the default
  </Step>

  <Step title="Configure project">
    For a project with a url such as "[https://gitlab.com/onyx-ai/onyx](https://gitlab.com/onyx-ai/onyx)", configure it as below:
  </Step>
</Steps>

<img className="rounded-image" src="https://mintcdn.com/danswer/24Ocig51qMqahMaT/assets/admins/connectors/gitlab/GitlabConnector.png?fit=max&auto=format&n=24Ocig51qMqahMaT&q=85&s=7cebb31878ca23f8ff12fcf4185a06dd" alt="Onyx GitLab connector project configuration example" width="1442" height="1118" data-path="assets/admins/connectors/gitlab/GitlabConnector.png" />
