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

# Integrating with GitLab

> Learn how to integrate CodSpeed with GitLab.

## Setup

1. Go to your [CodSpeed settings](https://app.codspeed.io/settings)

   <Note>
     **Required permissions**: If you are importing a repository from an
     organization, you need to be either a **Provider Admin** or a **Admin** of
     this organization. Check out the
     [CodSpeed Roles & Permissions page](/features/roles-and-permissions) for more
     information.
   </Note>

2. Generate
   [a Personal Access Token on GitLab](https://gitlab.com/-/user_settings/personal_access_tokens?name=Codspeed+Token\&scopes=api)
   with the `api` scope.

   <img src="https://mintcdn.com/codspeed/jKaxX6yy-Kzw1C-0/assets/create-gitlab-pat.png?fit=max&auto=format&n=jKaxX6yy-Kzw1C-0&q=85&s=6330166d84b5f4309786070250f9cdc3" className="rounded-xl w-full max-w-lg mx-auto" alt="Create a Personal Access Token on GitLab" width="2493" height="1691" data-path="assets/create-gitlab-pat.png" />

   <Warning>
     **Expiration Date**: Make sure to change the expiration date of the token
     since it's set to one month by default. We recommended to set it to **one
     year**. Please note that if the token is expired, your CodSpeed integration
     will stop working.
   </Warning>

   <Tip>
     **Bot Account**: CodSpeed uses a single user to access GitLab resources on
     behalf of it. You can generate one either for an existing user, or for a new
     dedicated bot account (recommended). This user/account will be the one to
     publish comments on merge requests.
   </Tip>

3. Fill the Personal Access Token in
   [CodSpeed settings](https://app.codspeed.io/settings)

   <Frame>
     <img src="https://mintcdn.com/codspeed/jKaxX6yy-Kzw1C-0/assets/gitlab-pat.png?fit=max&auto=format&n=jKaxX6yy-Kzw1C-0&q=85&s=d8de940190436ca0acfcc757a3f48a89" className="rounded-xl w-full max-w-lg mx-auto" alt="GitLab Personal Access Token section" width="1510" height="634" data-path="assets/gitlab-pat.png" />
   </Frame>

4. Your repositories should appear in the list of repositories.

   <Frame>
     <img src="https://mintcdn.com/codspeed/SwdNrtJu0iSVsYr5/assets/gitlab-connect-repo.png?fit=max&auto=format&n=SwdNrtJu0iSVsYr5&q=85&s=0065002cd9aa10bbc6663a3b488a88cf" alt="Repositories list after installation" className="rounded-xl w-full max-w-md mx-auto" width="3750" height="1438" data-path="assets/gitlab-connect-repo.png" />
   </Frame>

You can now continue and [setup the continuous reporting](/integrations/ci)
