# Connecting to GitLab

Connecting the Seal platform to a GitLab repository enables it to automatically sync with your projects, detect vulnerable packages, and possibly open pull requests to replace vulnerable packages with fully-compatible sealed versions.

After you click **Import from GitLab** on the onboarding, you will need to put a URL to your organization on GitLab, and a personal access token with the requisite permissions.

<figure><img src="/files/6VCfpYmOkDj5VyTKKD8u" alt="" width="563"><figcaption></figcaption></figure>

#### Generating the personal access token on GitLab

1. In the **Project Access Tokens** screen give your token a name and a distant expiration date (we recommend at least one year in the future).
2. The role must be **Developer**, **Maintainer** or **Owner**.
3. Give the token **api** access.
4. Create the token, and copy it to the relevant field in the **Link to GitLab** window shown above.

<figure><img src="/files/Ooh8AzJjQwJuOw9dlXYm" alt=""><figcaption></figcaption></figure>

#### Adding projects

After you've configured the connection to GitLab, you'll need to connect to the relevant code projects. Each project maps to an individual dependency file, for example `package-lock.json`. You can choose which dependency files you want Seal to scan. Each dependency file will map to a separate project on the platform.

You can either choose from a list of automatically detected projects, or add your projects later manually by clicking on the **New project** button in the **Projects** tab.

{% hint style="info" %}
The **Project ID** field is used to identify the project when communicating with the artifact server. It is meant to be used by machines, and it won't be editable later.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sealsecurity.io/fundamentals/readme/package-discovery/connecting-to-gitlab.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
