# Adding GitLab (cloud) organization to GitProtect

## Using OAuth <a href="#add_new_organization" id="add_new_organization"></a>

{% stepper %}
{% step %}
Log in to **GitProtect Management Service**, open the **DevOps** tab on the left side of the window, and select **GitLab** from the list.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fe9F5nL41J0rHn2ipJLB5%2Fimage.png?alt=media&#x26;token=5b46d6ca-33db-41f1-9e29-e98692e977a0" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click the **Connect** button under **GitLab**.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-be6c45e6f8ef104fd2968a580d1558e92931b16e%2Fimage%20(1043).png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
[In the window that pops-up](#additional-browser-permissions), log in with a user account which has the required permissions for the repositories or projects to protect. If your **GitLab** login session is active in a different tab, the login will complete automatically.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-2c9ac23c7e99fbe54b535a78d20f9fb9bae5f5b0%2Fimage%20(1044).png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Grant **GitProtect** access to the specified resources (when prompted).
{% endstep %}

{% step %}
Your **GitLab** organization has now been successfully added to **GitProtect**. Click **Custom policy** to adjust your backup policy settings, or click **Run backup** to execute the backup immediately using the current policy configuration.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fw7KNvehyLtxohHsacVhl%2Fimage.png?alt=media&#x26;token=2224b36d-f7f4-492b-afdf-bf609cce13d1" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

***

## Using OAuth (Advanced Mode)

{% stepper %}
{% step %}
Log in to **GitProtect Management Service**, open the **DevOps** tab on the left side of the window, and select **GitLab** from the list.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fe9F5nL41J0rHn2ipJLB5%2Fimage.png?alt=media&#x26;token=5b46d6ca-33db-41f1-9e29-e98692e977a0" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click the **advanced mode** link under **GitLab** and **GitLab Self-managed** tiles.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-c191bc97cf9dc767b66af82dde858c8f64e94c3e%2Fimage%20(1047).png?alt=media" alt="" width="529"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Set your authentication method.

1. In **Authentication**, select **GitLab**.
2. For **Connect using**, choose **OAuth App**.
3. Choose whether **GitProtect** should automatically add new repositories to your backup and whether it should include **GitLab** groups in the backup.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-7d3e54d2bb23bedbfd2ede0ab389e432a3832c19%2Fimage%20(1046).png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Configure your repository sync and default worker. Specify hours for synchronization, or set a time interval for automatic updates.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-5ab58a4516d8c4e632f19414df90102f4b3256ba%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
[In the window that pops-up](#additional-browser-permissions), log in with a user account which has the required permissions for the repositories or projects to protect. If your **GitLab** login session is active in a different tab, the login will complete automatically.
{% endstep %}

{% step %}
Grant **GitProtect** access to the specified resources (when prompted).
{% endstep %}

{% step %}
Your **GitLab** organization has now been successfully added to **GitProtect**. Click **Customize policy** to adjust your backup policy settings, or click **Run now** to execute the backup immediately using the current policy configuration.
{% endstep %}
{% endstepper %}

***

## Using Personal Access Token (PAT)

{% stepper %}
{% step %}
Log in to **GitProtect Management Service**, open the **DevOps** tab on the left side of the window, and select **GitLab** from the list.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fe9F5nL41J0rHn2ipJLB5%2Fimage.png?alt=media&#x26;token=5b46d6ca-33db-41f1-9e29-e98692e977a0" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click the **advanced mode** link under **GitLab** and **GitLab Self-managed** tiles.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-c191bc97cf9dc767b66af82dde858c8f64e94c3e%2Fimage%20(1048).png?alt=media" alt="" width="529"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Set your authentication method.

1. In **Authentication**, select **GitLab**.
2. For **Connect using**, choose **Login and Personal Access Token**.
3. Enter your **username** or **email**.
4. Add or select **PAT** from the **Password Manager**.
5. Choose whether **GitProtect** should automatically add new repositories to your backup and whether it should include **GitLab** groups in the backup.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-9ba66345799934c810b515fda3be33aa7565f10a%2Fimage%20(1045).png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Configure your repository sync and default worker. Specify hours for synchronization, or set a time interval for automatic updates.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-5ab58a4516d8c4e632f19414df90102f4b3256ba%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click **Proceed** to complete adding your **GitLab** organization and grant **GitProtect** access to the specified resources.
{% endstep %}
{% endstepper %}

***

## Additional browser permissions

When adding an organization, you may be prompted to grant additional permissions to the **GitProtect** application—make sure your browser allows **GitProtect** to open pop-up windows.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2Fgit-blob-c58cd6d726e43d47a8a4031beb8052c9a7081f35%2F1%20(4).PNG?alt=media" alt=""><figcaption></figcaption></figure>

Depending on your browser, you can either adjust the settings to allow pop-ups or permit the authorization window to open once.

<figure><img src="https://696332517-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtsE6XtJyUIEKVdSxPlS3%2Fuploads%2FH587HP4uqmumoshAJKZh%2Fimage.png?alt=media&#x26;token=fbbdb1b9-02a3-4d7c-934d-81dfdd77baf0" alt="Mozilla pop-up allowance"><figcaption></figcaption></figure>


---

# 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://helpcenter.gitprotect.io/backup-and-recovery/devops/gitlab/integration/adding-gitlab-cloud-organization-to-gitprotect.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.
