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

> ## Agent Instructions
> These are the docs for Sevalla, a platform for deploying applications, databases, static sites, object storage and load balancers. The dashboard is at https://app.sevalla.com.
> Bold text in steps is an exact dashboard label.
> To act on a Sevalla account, prefer the Sevalla MCP server (https://mcp.sevalla.com/mcp, see https://docs.sevalla.com/ai-agents/overview.md), then the Sevalla CLI (https://docs.sevalla.com/developer-tools/cli.md), then the REST API (https://api-docs.sevalla.com, OpenAPI spec at https://api.sevalla.com/v3/openapi.json).
> Every page index is at https://docs.sevalla.com/llms.txt.

# GitLab

> Connect GitLab.com to Sevalla to deploy from your projects, get automatic deployments through a project webhook, use merge request preview apps, and disconnect it.

Sevalla connects to GitLab.com through an OAuth application named MyKinsta (Sevalla is a Kinsta product). Once you authorize it, Sevalla lists every project you're a member of, deploys from the one you pick, and adds a webhook to the project so pushes and merge requests reach Sevalla.

## How the GitLab connection works

| Part | Detail |
| - | - |
| Hosting | GitLab.com only. Self-managed GitLab instances can't be connected; deploy a public project from them as a [public repository](/git/overview#deploy-a-public-repository). |
| Access requested | The `api` scope, shown by GitLab as **Access the API on your behalf** |
| Projects listed | Every project you're a member of, directly or through a group, shown as `namespace/project` |
| Cloning | With the account of a Sevalla user who connected GitLab and can access the project. Services keep deploying as long as one of those accounts stays connected. |
| Pushes and merge requests | Through a webhook Sevalla adds to the project (push, merge request and pipeline events) |
| Comments on merge requests | Posted with the account of a Sevalla user who connected GitLab |

## Connect GitLab

<Steps>
  <Step title="Start from a repository picker">
    In the sidebar, click **Applications**, then click **Create** and **Application**. Under **Source**, keep **Private repository**, pick **GitLab**, then click **Connect to GitLab**. The same button shows when you create a static site or set up preview apps.
  </Step>

  <Step title="Authorize the application on GitLab">
    In the new tab, sign in to GitLab.com if needed, then click **Authorize MyKinsta**.
  </Step>

  <Step title="Go back to Sevalla">
    Return to the Sevalla tab. It picks up the connection on its own; if it doesn't, click **Check again**.
  </Step>
</Steps>

<Frame>
  <img className="block dark:hidden" src="https://assets.sevalla.com/screenshots/light/app-create-gitlab-connect.png" alt="The Source section of the create application page with GitLab picked as Git provider and a Connect to GitLab button" width="872" />

  <img className="hidden dark:block" src="https://assets.sevalla.com/screenshots/dark/app-create-gitlab-connect.png" alt="The Source section of the create application page with GitLab picked as Git provider and a Connect to GitLab button" width="872" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/sevalla/a3xHmYExJQcu1_oY/images/gitlab/authorize-light.png?fit=max&auto=format&n=a3xHmYExJQcu1_oY&q=85&s=8ba29bf5125b560ab74b612dbfac25ca" alt="GitLab's page MyKinsta is requesting access to your account on GitLab.com, with Access the API on your behalf and an Authorize MyKinsta button" width="647" data-path="images/gitlab/authorize-light.png" />
</Frame>

**Repository** now lists your GitLab projects. If you create a project while the page is open, click the refresh button next to **Repository**.

## Automatic deployments and the webhook

When you turn on automatic deployments for a service, or [preview apps](/pipelines/preview-apps) for a pipeline, Sevalla adds a webhook to the GitLab project, or updates the one it added earlier. You can see it in the project's **Settings** > **Webhooks** on GitLab. Don't delete it: without it, pushes and merge requests don't reach Sevalla.

<Info>
  GitLab lets only Maintainers and Owners of a project add webhooks. At least one Sevalla user with the Maintainer or Owner role on the project must have connected GitLab, or the webhook isn't added and pushes don't deploy.
</Info>

If pushes don't deploy, check that the webhook exists. To add it again, a Maintainer connects GitLab to Sevalla, then you turn automatic deployments off and on again on the service: see [Deploy automatically on push](/applications/deployments#deploy-automatically-on-push) for applications and [static sites](/static-sites/deployments#deploy-automatically-on-push).

### Merge request preview apps

Pipelines with preview apps treat merge requests as pull requests:

| On GitLab | In Sevalla |
| - | - |
| A merge request opens | With automatic creation on, a preview app is created for it |
| Commits are pushed to its source branch | The preview app redeploys |
| The merge request is merged or closed | The preview app is deleted |
| A closed merge request is reopened | Nothing: click **Create preview app** on its card in the **Preview** column |

The preview app's status and link are posted as a comment on the merge request. GitLab doesn't get deployment statuses from Sevalla.

## Disconnect GitLab

<Steps>
  <Step title="Revoke in Sevalla">
    In the user menu, click **My account**. In **Git login & repository access**, click **Revoke** on GitLab's **Repository access** line, then **Revoke** in the dialog.
  </Step>

  <Step title="Revoke on GitLab">
    If GitLab's **Login** is disabled too, Sevalla opens GitLab's **Applications** page in your user settings (`https://gitlab.com/-/user_settings/applications`). Under **Authorized applications**, revoke **MyKinsta**.
  </Step>
</Steps>

Projects that no other connected Sevalla user can access are disconnected, and Sevalla removes their webhooks if your account could manage them. Services that deploy from those projects stop deploying. See [Revoke repository access](/git/overview#revoke-repository-access).

## If a project is missing

| Cause | Fix |
| - | - |
| You aren't a member of the project or its group | Ask for access on GitLab. |
| The project was created after the page opened | Click the refresh button next to **Repository**. |
| The project is on a self-managed GitLab instance | It can't be connected. Mirror it to GitLab.com, or deploy it as a public repository if it's public. |
| The list stays empty although you have access | In **My account**, revoke **Repository access** for GitLab, then [connect GitLab](#connect-gitlab) again. |

For deployments that fail because a project isn't available anymore, see [Troubleshoot builds and deployments](/applications/troubleshooting/builds-and-deployments).

## API and CLI

| Task | API | CLI |
| - | - | - |
| Get the GitLab connect URL | [List Git providers](https://api-docs.sevalla.com/v3/git/list-git-providers) | `sevalla git providers` |


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