> For the complete documentation index, see [llms.txt](https://docs.brainboard.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.brainboard.co/settings/integrations/git-configuration/gitlab.md).

# GitLab

### Add Git connection

To add a <mark style="color:blue;">**GitLab**</mark> personal **Git token** in <mark style="color:$primary;">**Brainboard**</mark>, you first need to generate it in your <mark style="color:blue;">**GitLab**</mark> account.

<details>

<summary><strong>Steps to generate a personal Git token on your </strong><mark style="color:blue;"><strong>GitLab</strong></mark><strong> account.</strong></summary>

1. Go to your **GitLab**[ personal tokens page](https://gitlab.com/-/profile/personal_access_tokens).
2. Add a name and specify <mark style="color:blue;">**`API`**</mark> rights, then click on <mark style="color:blue;">**`Create personal access token`**</mark> button.<br>

   <figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2FTtJaTGFd1ET7a9PDNlWp%2Fimage.png?alt=media&amp;token=eaa4238d-6022-4d4e-9559-2ac2669bbcf7" alt=""><figcaption></figcaption></figure>
3. Once the token is generated, you can copy it to add to <mark style="color:$primary;">**Brainboard**</mark>.<br>

   <figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2F1v1U0t2x5R0GXW5JdxpS%2Fimage.png?alt=media&amp;token=024cfe7c-03f8-4825-9e1f-a825ad63792a" alt=""><figcaption></figcaption></figure>

</details>

#### Steps to add the generated token in Brainboard.

1. Go to the [Git connections](https://app.brainboard.co/settings/integrations/git) page.
2. Click on <mark style="color:$primary;">**`Add connection`**</mark> .
3. Switch to the <mark style="color:$primary;">**`GitLab`**</mark> tab.

<figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2FvE2z6yWYGlcDV00wm4we%2Fgit-lab.png?alt=media&amp;token=4fd1d564-0d23-4a02-9636-2a9a62c0c3c2" alt=""><figcaption></figcaption></figure>

4. Add your credentials in the displayed window.&#x20;

* **Name** of the token. This is only for <mark style="color:$primary;">**Brainboard**</mark>; it will not be used when you do a pull request.
* The **URL** of your <mark style="color:blue;">**GitLab**</mark> server. By default, <mark style="color:$primary;">**Brainboard**</mark> uses <mark style="color:$primary;">**`https://gitlab.com`**</mark>, but if you have a private <mark style="color:blue;">**GitLab**</mark> instance accessible through the internet or if you use a **single-tenant** <mark style="color:$primary;">**Brainboard**</mark> offering, you can specify a different URL.

5. Then click the <mark style="color:$primary;">**`Save and close`**</mark> button.
6. <mark style="color:$primary;">**Brainboard**</mark> will verify if the credentials are valid:
   1. **Valid credentials:** In this case, <mark style="color:$primary;">**Brainboard**</mark> displays a success message, and you can see the integration now on the <mark style="color:$primary;">**Git connections**</mark> page. <br>

      <figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2Fpra8KE7gQGR5DC2nb3nn%2FCleanShot%202025-04-11%20at%2017.07.55%402x.png?alt=media&amp;token=7628f78c-bf93-4f36-a57b-45f561a58ad6" alt=""><figcaption></figcaption></figure>
   2. **Invalid credentials:** In this case, you'll receive an error about what is wrong. For example, the one shared below.&#x20;

<figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2FgaZmos9ZC0IHnh4LCMd0%2Fbitbucket-error.png?alt=media&amp;token=f1c4c9ac-b91a-4307-8a8f-bf45e0ed04a8" alt=""><figcaption></figcaption></figure>

### How to use

Please refer to the page [How to use](/settings/integrations/git-configuration/pull-requests.md) to understand how you can use your **Git connections,** whether you want to do a pull request and import your code from **Git.**

### Edit or delete connection

1. Go to the [Git connections](https://app.brainboard.co/settings/integrations/git) page.
2. Click on the connection that you want to edit or delete.&#x20;
3. If you want to edit, simply make your changes and click the <mark style="color:$primary;">**`Save and close`**</mark> button.&#x20;
4. To delete, click on the <mark style="color:red;">**`Delete Configuration`**</mark> button given at the bottom right corner of the page.
5. Click on the <mark style="color:red;">**`Delete`**</mark> button again to confirm your action.&#x20;

<figure><img src="https://2733077811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7YhVIZuz5Brv8kisTlFL%2Fuploads%2FrrQEoh3qgwhgLbTUIvtY%2Fdelete-connec.png?alt=media&amp;token=84e210b5-ff62-423b-91fd-949e758b5768" alt=""><figcaption></figcaption></figure>
