---
sidebar_position: 5
title: GitLab Integration
---

# GitLab Integration

Connect a **self-hosted GitLab** instance (or GitLab SaaS) so your agents can read repos, merge requests, issues, and pipelines. GitLab uses a **Personal Access Token**.

## How It Works

You provide your GitLab instance URL and a Personal Access Token. The `gitlab` skill then exposes GitLab's API to any node that declares it. Outbound calls to a firewalled self-hosted instance can be pinned to a [dedicated egress IP](../cloud/dedicated-egress.md).

## Connect GitLab

1. In GitLab, go to **User Settings → Access Tokens** and create a Personal Access Token with the `read_api` and `read_repository` scopes (form `glpat-...`)
2. In the Zibby dashboard, go to **Settings → Integrations** and click **Connect GitLab**
3. Enter your **GitLab Instance URL** (e.g. `https://gitlab.company.com`)
4. Paste the **Personal Access Token**
5. Click **Connect** — Zibby validates both before saving

| Field | Required | Notes |
|---|---|---|
| GitLab Instance URL | Yes | Your instance, e.g. `https://gitlab.company.com` (or `https://gitlab.com`) |
| Personal Access Token | Yes | `glpat-...` with `read_api` + `read_repository` scopes |

## What Agents Can Do

Nodes that attach the [`gitlab` skill](../skills/index.md) get tools for repos, merge requests, issues, and pipelines, against either self-hosted GitLab or GitLab SaaS.

## Reference keys (SDK / CLI)

When running agents directly, the connector reads `GITLAB_TOKEN` (and a base URL for self-hosted instances) from the environment.

## Firewalled instances

If your GitLab is behind a firewall, add the [dedicated egress IP addon](../cloud/dedicated-egress.md) so all outbound traffic comes from one whitelistable IP.

## Troubleshooting

**"401 Unauthorized"** — regenerate the token with `read_api` + `read_repository` scopes; expired or under-scoped tokens fail here.

**"Could not reach instance"** — confirm the instance URL is reachable from Zibby's egress IP and that it points at the GitLab base URL, not a project page.
