---
title: "Zentrik + GitLab"
canonical_url: https://zentrik.ai/docs/integrations/gitlab
markdown_url: https://zentrik.ai/docs/integrations/gitlab.md
category: "Integrations"
learning_track: null
last_reviewed: 2026-11-13
---

# Zentrik + GitLab

Keep the product knowledge you commit to GitLab current in Zentrik.

## Overview

Some teams keep their product knowledge in a repository: a folder per product, a file per insight, a catalog of metrics. Follow its branch and Zentrik keeps a copy that people, the Assistant and connected agents read, with the folders and files as you wrote them.

Each day Zentrik asks GitLab where the branch is, and **Check GitLab** asks now. When it moved, Zentrik reads only the files that changed. Nothing is written back to GitLab.

## Connect GitLab

A workspace owner or admin connects GitLab once.

1. In GitLab, create an access token with the **read_api** scope ([access tokens](https://docs.gitlab.com/user/profile/personal_access_tokens/)). A **project access token** limits Zentrik to one repository; a personal or group token can read every project its user can.
2. In Zentrik, open **Settings → Integrations → GitLab**.
3. Enter your GitLab address (`https://gitlab.com`, or your own instance) and paste the token.

Zentrik checks the token before saving it. It is encrypted and never shown again. A self-managed instance must be reachable from the internet over https.

## Follow a branch

1. On the **Context** page, open the menu and select **Follow a repository**. For a source you already brought in as a folder, open the source and select **Follow a repository**.
2. Choose **GitLab**, the project and the branch. To follow part of the repository, name a folder, like `docs/product`.
3. Select **Follow branch**. Zentrik reads it now; the folders appear on the source page when it finishes.

The source page says which branch and commit it holds, and when it was last updated. **Check GitLab** reads the branch again now. The same follow works from [GitHub](https://zentrik.ai/docs/integrations/github).

## How updates arrive

- Zentrik compares the last commit it read with the branch head and reads only the files that changed. An unchanged branch costs one request.
- It reads the whole branch again when the difference cannot be trusted: the history was rewritten, a `.gitignore` changed, or someone brought a folder in by hand since.
- It leaves out what Git ignores, other checkouts, `node_modules` and empty-folder placeholders, the same as bringing a folder in.
- Moved files keep their place in Zentrik when their content did not change. Removed files leave the source.
- When one update would remove more than a third of the source, Zentrik waits and says so on the source page. Check the branch and folder, then select **Update anyway**.
- If the source turns into records, the records follow each update.

## Data and access

- Zentrik reads the projects the token can see, their branches, and the files under the followed folder. It does not read issues, merge requests or pipelines.
- Files are kept as they are in the repository. Text files are readable and searchable; other files are kept as attachments.
- Anyone who can read Context in the workspace can read the source. GitLab permissions do not carry over to people in Zentrik.
- **Stop following** keeps the source as it is. Disconnecting GitLab removes the token and stops every follow. Revoke the token in GitLab if nothing else uses it.

## Troubleshooting

### GitLab did not accept the token

Check the address and that the token has not expired, then paste it again. The token needs the read_api scope.

### A project is missing

The token only sees projects its user, group or project can read. Add the user to the project, or use a token from that project.

### The address is not reachable

Zentrik reads GitLab from the internet. An instance only on a private network cannot be followed.

### An update is waiting

The latest commit would remove more than a third of the source. If the branch and folder are right, select Update anyway. Otherwise change the branch.

### More than 20,000 files

A source holds up to 20,000 files. Follow the folder that holds your product knowledge instead of the whole repository.

## Related guides

- [Connect KickScale](https://zentrik.ai/docs/integrations/kickscale)
- [Zentrik + Amplitude](https://zentrik.ai/docs/integrations/amplitude)
- [Zentrik + Looker](https://zentrik.ai/docs/integrations/looker)
