> For the complete documentation index, see [llms.txt](https://docs.hivel.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hivel.ai/integrations/version-control/gitlab/how-to-ensure-gitlab-token-has-access-to-required-groups-repositories.md).

# How to ensure Gitlab token has access to required groups/repositories

Follow these steps to grant a service account access to required repositories:

#### **Navigate to the GitLab Group**

1. Log in to GitLab.
2. In the left sidebar, click **"Groups"** → **"Your Groups"**.
3. Select the Group where you want to add the service account.<br>

   <figure><img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2FRMsY4JlEmBXFZKupVN87%2Fimage%20(43).png?alt=media&amp;token=11ff1b0d-f5ad-4a6d-b589-6316bc0f79b2" alt="" width="134"><figcaption></figcaption></figure>

#### **Open the Group’s Members Settings**

1. In the Group Dashboard, go to the left sidebar.
2. Click **"Settings"** → **"Members"**.<br>

   <figure><img src="https://3057781534-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5KAIOUWph0JLSgQqbzyT%2Fuploads%2Fdh8rUvMjdaVmLeCfacjy%2Fimage%20(44).png?alt=media&amp;token=347bde98-47d3-47bc-acd2-99ee06b78f36" alt="" width="188"><figcaption></figcaption></figure>

#### **Invite the Service Account**

1. Click **"Invite Member"** (top right corner).
2. In the **"Select members or email address"** field, enter the service account username or email.
3. Assign a "Reporter" or "Developer" role as required.
4. Click **"Invite"**.

Repeat the steps for all required groups.

Once added, the service account will inherit access to all repositories within the groups.
