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

# Connect a GitLab repository

> Connect a Paradime workspace to its GitLab project over HTTPS through the GitLab connection or with an SSH deploy key, link your GitLab account, and see how DinoAI agents work on GitLab.

A workspace can reach its GitLab project in two ways:

| Method | How Paradime reaches the project | CI/CD on merge requests |
| - | - | - |
| **GitLab connection** (recommended) | Over HTTPS, with short-lived tokens from your company's [GitLab connection](https://docs.paradime.io/integrations/gitlab). There is no key to manage. | Built in |
| **Deploy key (SSH)** | Over SSH, with a deploy key that Paradime generates and you add to the project. | Built in when the project is on a GitLab connection. Otherwise, a GitLab pipeline. |

Before you connect a workspace through the GitLab connection, install the connection on the project. See [Connect gitlab.com](https://docs.paradime.io/integrations/gitlab/gitlab-com.md) or [Connect GitLab Self-Managed](https://docs.paradime.io/integrations/gitlab/self-managed.md).

## Connect a workspace through the GitLab connection

1. In Paradime, go to **Settings > Git Repository**.
2. In **Choose your provider**, select **GitLab**.
3. In **Choose how Paradime connects**, select **GitLab connection** and click **Continue**.
4. If your company has no GitLab connection that covers the project yet, click **Set up the GitLab connection**. Paradime opens the GitLab integration page. Install the connection, then come back to this page.
5. In **Pick the project**, select the project. The list shows only the projects that a GitLab connection reaches.
6. Click **Connect project**.

Paradime clones the project over HTTPS. The **Repository** card then shows **Connected with: GitLab connection** and the project path.

### In workspace setup

When you create a new workspace, the repository step has the same choice:

1. Choose **GitLab**, then **GitLab connection**.
2. If GitLab is not connected yet, choose **GitLab** (your projects live on gitlab.com) or **GitLab Self-Managed** (your company runs its own GitLab instance), and install the connection in the same step.
3. In **Pick the project**, select the project and click **Connect project**.

> [!NOTE]
>
> A workspace that already has a repository can connect only that same project through the GitLab connection. To use a different project, click **Change repository** first. See [Update connected git repository](https://docs.paradime.io/products/settings/git-repositories/update-connected-git-repository.md).

## Switch a deploy-key workspace to HTTPS

When a GitLab connection already covers the project of a workspace that uses a deploy key, the **Git Repository** page shows a banner: **Switch to HTTPS: the GitLab connection to `<host>` already covers this project**.

1. Go to **Settings > Git Repository**.
2. In the banner, click **Switch to HTTPS through GitLab**.

The repository does not change, only how Paradime reaches it. The deploy key stays on file. To clone over SSH again, click **Switch back to the deploy key** in the banner.

## What changes for the workspace

On a workspace connected through the GitLab connection, every part of Paradime uses HTTPS:

| Where | How it reaches the project |
| - | - |
| **Code IDE** | Each person's clone uses HTTPS with their own GitLab account, after they [link it](#link-your-gitlab-account). Their commits and pushes are their own. |
| **Bolt** | Each run gets a read token for the project at run start and clones over HTTPS. |
| **DinoAI agents** | The agent clones over HTTPS and pushes only to its own branch. See [DinoAI agents on GitLab](#dinoai-agents-on-gitlab). |
| **dbt™ packages** | `dbt deps` in Bolt and in agents installs packages from projects on the same GitLab instance. |

## Link your GitLab account

To use git in the Code IDE on a workspace connected through GitLab, each person links their own GitLab account. Their commits and pushes are then made as them.

1. Go to **Settings > Integrations** and open the **Personal** tab.
2. On the **GitLab** tile, click **Connect**.
3. Sign in to GitLab and authorize Paradime.

The tile then shows **Connected as @`<your GitLab username>`**.

If you push from the Code IDE before you link your account, the git error has a link. The link opens a page that starts the GitLab sign-in in one click.

> [!NOTE]
>
> On GitLab Self-Managed, the **GitLab** tile shows only when the Paradime OAuth application is registered on your instance. See [Register the OAuth application](https://docs.paradime.io/integrations/gitlab/self-managed.md#step-5-register-the-oauth-application). If your company set a [sign-in URL](https://docs.paradime.io/integrations/gitlab/self-managed.md#change-the-sign-in-url), your browser opens GitLab at that address.

## DinoAI agents on GitLab

On a workspace connected through the GitLab connection, a DinoAI agent session works on GitLab like this:

* The agent pushes only to its own branch, `paradime/<session id>`. It cannot push to `main` or to any other branch.
* When the agent opens a merge request, GitLab shows the person who started the session as its author, if they [linked their GitLab account](#link-your-gitlab-account). Otherwise the Paradime bot opens it. The agent never sees the person's token.
* The agent's commits have `DinoAI` as the author and the person who started the session as a co-author.
* The agent can read the project and its merge requests, open a merge request from its own branch, and comment on that merge request. It cannot approve, merge, or edit merge requests, or change project settings.

## When the connection cannot reach the project

The **Git Repository** page tells you when a workspace loses its GitLab connection:

| Message | What it means | What to do |
| - | - | - |
| **The GitLab connection can't reach this project** | The bot lost access to the project, or the project moved. | Give the bot access to the project again, then click **Test connection**. Or click **Check now** on the [connection card](https://docs.paradime.io/integrations/gitlab/connection-health.md). |
| **This workspace is disconnected** | The GitLab connection it used no longer covers its project, for example after someone unlinked the project. | Pick the project again to connect. |
| **No GitLab project left to use** | None of the company's GitLab connections reaches a project. | Add the project to a GitLab connection, then reconnect. |

## Connect with a deploy key

You can also connect a GitLab project with an SSH deploy key. If the project is also on a GitLab connection, Turbo CI, on-merge runs, and Lineage Diff still work with no pipeline. If it is not, they need a [GitLab pipeline](https://docs.paradime.io/products/bolt/ci-cd/turbo-ci/gitlab.md#run-turbo-ci-from-a-gitlab-pipeline).

> [!WARNING]
>
> With a deploy key, use the `git@...` or `ssh://...` version of your Git URL, not the `https://...` version.

> [!TIP]
>
> Create a service account user in GitLab, for example **`paradime.gitlab.maintainer@yourcompany.com`**, with write access to the project, and let this user own the deploy key.

1. In Paradime, import your repository with its SSH URL to generate a deploy key. See [Importing a repository](https://docs.paradime.io/products/settings/git-repositories/importing-a-repository/index.md).
2. In GitLab, open your project's **Settings > Repository**.
3. Expand **Deploy keys** and paste the deploy key from Paradime.
4. Select **Grant write permissions to this key**, then save the key.

![Configuring a GitLab deploy key](https://mintcdn.com/paradime-docs/9ZsuN0wtxDqr0yUA/images/image-19-1-1.png?fit=max\&auto=format\&n=9ZsuN0wtxDqr0yUA\&q=85\&s=4013fd77172254e0578e79af47b24f08)

For more detail, see GitLab's guide on [deploy keys](https://docs.gitlab.com/ee/user/project/deploy_keys/).


## Related topics

- [Git Repositories](https://docs.paradime.io/products/settings/git-repositories/index.md)
- [Importing a repository](https://docs.paradime.io/products/settings/git-repositories/importing-a-repository/index.md)
- [Update connected git repository](https://docs.paradime.io/products/settings/git-repositories/update-connected-git-repository.md)
- [Create a workspace](https://docs.paradime.io/guides/paradime-101/getting-started-with-your-paradime-workspace/creating-a-workspace.md)
- [GitLab](https://docs.paradime.io/integrations/gitlab/index.md)


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