# GitLab

![gitlab-logo-100.png](https://assets.relyanceuat.xyz/images/docs/34571220254605/34571214294157.png)
GitLab is an open source code repository and complete DevOps platform. It offers a location for online code storage and capabilities for issue tracking and CI/CD.

In order to integrate GitLab with Relyance AI you will need a **Client ID** and **Client Secret** and follow an Oauth2 flow.

#### In GitLab:

1. Login to your GitLab account.
2. In the top right-hand corner, click your account menu.
3. Select **Edit profile**.
4. In the left-hand navigation menu select **Applications**.
5. Add a new application by filling out the resulting form. **Name**: << Pick a relevant name for this e.g. Relyance AI >> **Redirect URL**: [https://root.relyance.ai/api/oauth2](https://root.relyance.ai/api/oauth2) **Confidential**: Check **Scopes**: - read_api - read_user - read_repository - read_registry
6. Click **Save application**.
7. This will bring up a application's **Client ID** and **Client Secret.** Copy both to be used in Relyance.

![Gitlab-3.png](https://assets.relyanceuat.xyz/images/docs/34571220254605/34571220235021.png)

![Gitlab-4.png](https://assets.relyanceuat.xyz/images/docs/34571220254605/34571214299533.png)

#### In the Relyance AI application:

1. Login to your Relyance AI account.
2. Navigate to the **Settings** (bottom-left corner).
3. Select **Integrations**.
4. Search and locate the **GitLab** integration card and click on it.
5. Click on the **Add Connection** button on the top right.
6. Provide a meaningful name for the integration and click on the **Add** button.
7. In the **Overview** section, select the integration features you wish to enable for the integration, review the **Scope and Permission**, and **Endpoint** details and click on **Continue**. For more details, see [Integration Features](/docs/introduction-to-relyance-ai/integration-features/).
8. In the **Connection** section, provide the appropriate values and click on **Continue**,
    - **Connection Name**: This property allows you to update the integration specified in Step 6. If you have multiple integrations for the same vendor, you may want to assign distinct names to each. This helps streamline filtering by **Discovery Source** across the **Inventory**, **Visual** **Maps**, **Assets**, and **Data Flow Analysis** pages.
    - **Rescan Frequency**: This property allows you to configure how often Relyance executes scans against this Vendor connection.
    - **Business Atlas Associations** (required): the business entities or products that newly discovered third parties, services and assets from this integration are attributed to. Choose at least one from the **Select Associations** dropdown — the wizard will not advance past this step without one. For more details, see [Business Atlas](/docs/other-settings/business-atlas-overview/).
9. In the **Authentication** section, Please choose the authentication method as **Oauth2 / App Token** and provide the following information retrieved from the **In GitLab** section and click on **Authenticate**.
10. Review the configuration summary from the **Completion** section and click on **Finish.**
11. Confirm the integration Status reflects **Connected.**

![Screenshot 2025-11-04 143027.png](https://assets.relyanceuat.xyz/images/docs/34571220254605/40851831016717.png)

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34571220254605/34571220245261.png)

![Screenshot 2025-11-04 143300.png](https://assets.relyanceuat.xyz/images/docs/34571220254605/40851831016973.png)

![Screenshot](https://assets.relyanceuat.xyz/images/docs/34571220254605/34571220248589.png)

<!-- failure-modes:begin (generated from the integration catalog; do not hand-edit) -->

## If the connection reports Connected but returns nothing

These are the ways this integration comes back empty without reporting an error. Generated from the integration catalog, so it tracks what the connection actually asks for.

1. **Authorised, then empty.** The connection carries an authorisation, not a password: it stops returning data if the account that granted it loses access, its own permissions narrow, or the grant is revoked at the vendor. None of that reports an error here -- the connection keeps its last status until the next scan.
2. **A credential rotated at the vendor is not picked up here.** **Client Secret** is stored when you save the connection, so regenerating the value at the vendor breaks the next scan until it is re-pasted here. Recording the expiry on the connection means Relyance warns you before it lapses.

<!-- failure-modes:end -->

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

The **OAuth (browser authorization)** method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (`terraform import relyance_integration_connection.example gitlab/<connection_id>`) or reading it with the `relyance_integration_connection` data source.

<!-- terraform-examples:end -->
