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

# GitLab

> Integrate GitLab with AIM to automatically sync repositories and related asset metadata.

## Overview

The **GitLab integration** allows AIM to automatically fetch and maintain an up-to-date catalog of repositories stored in your GitLab organization or groups.\
Once connected, AIM continuously pulls:

* Repository names
* Visibility (public / private)
* Default branches
* Timestamps
* Ownership and namespace
* Associated metadata

This ensures your development assets remain accurately tracked inside AIM without manual importing.

![](https://mintlify.s3.us-west-1.amazonaws.com/snapsec-23724fa2/images/aim/gitlab.png)

GitLab Integration in AIM

***

## Prerequisites

Before setting up the integration, ensure the following:

* A GitLab account with API access
* A **Personal Access Token (PAT)** with:
  * `read_api`
  * `read_repository`
* The GitLab instance URL:
  * `https://gitlab.com` for cloud
  * Your custom domain for self-hosted GitLab (e.g., `https://gitlab.internal.company`)

> AIM never requires write permissions — only read access is needed.

***

## How to Connect GitLab to AIM

**1. Open Integrations**

Go to **AIM → Integrations** and locate the **GitLab** tile.

**2. Click Install**

Select **Install** to open the configuration modal.

**3. Enter GitLab Instance URL**

Provide the URL of your GitLab environment.

**4. Add Your Personal Access Token**

Paste your PAT with `read_api` permissions.

**5. Save Integration**

AIM will validate your credentials and begin importing repository data.

***

## What AIM Syncs from GitLab

AIM automatically imports and updates:

* Repository name
* Namespace (user or group)
* Description
* Visibility (private / internal / public)
* Repository URL
* Last activity timestamp
* Default branch
* Creation & update metadata

Syncs run continuously to ensure your inventory always reflects the latest repository state.

***

## Managing the Integration

After installation, you can:

* **Refresh** repositories manually
* **Pause / Resume** syncing
* **View sync logs** to confirm import success
* **Remove** the integration at any time

![](https://mintlify.s3.us-west-1.amazonaws.com/snapsec-23724fa2/images/aim/repos.png)

GitLab Repositories Synced in AIM

***

## Next Steps

> [card] [View Repository Catalog](https://docs.snapsec.co/products/aim/repo)
>
> Explore all GitLab repositories imported into AIM.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.