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

# GitLab Integration

> Add deploy keys to GitLab projects for Coalesce Quality

## Overview

This guide covers how to add the generated public SSH key as a deploy key to your GitLab project.

<Info>
  **Before you start:** Create your Git integration first by following the [integration form instructions](/code-integrations/overview#configuring-the-integration). You'll need the public SSH key from that integration.
</Info>

## Prerequisites

* Access to GitLab (GitLab.com or self-managed instance)
* **Maintainer or Owner access** to your project (required to add deploy keys)
* Public SSH key from your Git integration

<Note>
  ⏱️ **Estimated time:** 5 minutes
</Note>

## IP Whitelisting (If Required)

If your GitLab group uses IP address restrictions, add the Coalesce Quality egress IP addresses for your region. See [IP Whitelist](/security/ip) for the complete list.

For instructions on configuring IP restrictions in GitLab, see GitLab's guide on [IP address restrictions](https://docs.gitlab.com/ee/user/group/access_and_permissions.html#restrict-group-access-by-ip-address).

## Adding the Deploy Key

Follow these steps to add the public key as a deploy key to your GitLab project.

### Navigate to Repository Settings

1. On the top bar, select **Menu > Projects** and find your project

2. On the left sidebar, select **Settings > Repository**

   <Warning>
     If you don't see the **Settings** menu, you likely don't have Maintainer or Owner access to the project. Contact your project administrator to add the deploy key.
   </Warning>

### Add the Deploy Key

3. Expand **Deploy keys**

4. Configure the deploy key:
   * **Title:** Enter a descriptive name (e.g., `Coalesce Quality Integration`)
   * **Key:** Paste the public key from your integration (Step 1)
   * **Grant write permissions to this key:** Leave this checkbox **unticked** (unchecked)

<Warning>
  **Do not grant write permissions.** Coalesce Quality only requires read-only access to your repository.
</Warning>

5. Click **Add key** to save the deploy key

The deploy key is enabled immediately upon creation. Your GitLab project is now connected in read-only mode.

## Troubleshooting

### Deploy key not working

* Verify the **complete public key** was copied (including the `ssh-rsa` or `ssh-ed25519` prefix)
* Ensure the deploy key was added to the **correct project**
* Confirm **write permissions are disabled** (unchecked)

### Connection refused

* Check that your GitLab group's **IP address restrictions** (if configured) include the Coalesce Quality egress IPs
* Verify the repository **SSH URL** is correct in the integration form
* For **self-managed GitLab**, ensure the instance is accessible from the Coalesce Quality IP addresses

### No Settings menu visible

* Confirm you have **Maintainer or Owner access** to the project
* Check with your GitLab administrator for access permissions

## Additional Resources

* [GitLab Deploy Keys Documentation](https://docs.gitlab.com/ee/user/project/deploy_keys/)
* [GitLab IP Address Restrictions](https://docs.gitlab.com/ee/user/group/access_and_permissions.html#restrict-group-access-by-ip-address)
* [Back to Integration Overview](/code-integrations/overview)
