> For the complete documentation index, see [llms.txt](https://docs.pullrequest.com/gitlab-on-prem-self-managed/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pullrequest.com/gitlab-on-prem-self-managed/configure-gitlab-posting-user.md).

# Configure GitLab Posting User

Code reviews for your GitLab Self-Managed projects will be posted as a "PullRequest" member of your GitLab team. In order to post code reviews, the user must be created in your GitLab.

## Prerequisites

The GitLab posting user must be created by an individual on your team with the following administrative permissions:

* [ ] A PullRequest account with an Owner role for the organization in question.
* [ ] An Owner role on your GitLab Self-Hosted Group.

## Creating & Adding the GitLab User

Log into the PullRequest Proxy and click the **Configure GitLab** button on the home page.

![](https://1378996070-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LelcHIfjrgdiAjf_MQX%2F-LelxKfqmQVft3qo-6gr%2F-LelyWhOFJUvUdzZ3Y1D%2Fcode-provider-settings.png?alt=media\&token=dca25c0c-c4da-4760-b7c1-2f726690e744)

![](https://1378996070-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LelcHIfjrgdiAjf_MQX%2F-LelxKfqmQVft3qo-6gr%2F-Lelz175i5GWg4um7m1I%2Fconfigure-gitlab-settings.png?alt=media\&token=c75b6d5b-46a0-42ce-9131-66c482e9dedb)

### Add Root URL

Paste the root URL of your GitLab Self-Managed instance (this will be whatever domain your team usually uses to access GitLab). **Example:**

```
https://our-gitlab.internal
```

### Create Posting User

Log in to your GitLab instance as an administrator and create a new user with the username **PullRequest**. PullRequest reviewers and systems will use this user to post code review content.

### Add Posting User to Projects

Add the PullRequest user to all of the projects/repositories you want code review on. Be sure to grant the user **REPORTER** access so it's able to post comments.

{% hint style="success" %}
PullRequest will **never** write or modify code in your repositories. Read more about how we keep your code and data secure [here](https://www.pullrequest.com/security).
{% endhint %}

### Create GitLab Access Token

Log into GitLab as the PullRequest user you just created.

{% hint style="info" %}
This may be easier in another browser or in an incognito tab so you can remain logged in as the GitLab owner user.
{% endhint %}

Open **User settings** -> **Access Tokens**. This should be accessible from the following path:

```
https://our-gitlab.internal/profile/personal_access_tokens
```

Create a Personal Access Token with the following properties:

* [ ] **Name**: For your team's internal use. No functionality is associated with this property.
* [ ] **Expiration**: \*\*\* *Leave blank*.
* [ ] **Scopes**: The **api**, **read\_user**, and **read\_repository** scopes should all be checked.

![Creating a personal access token in GitLab](https://1378996070-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LelcHIfjrgdiAjf_MQX%2F-LelxKfqmQVft3qo-6gr%2F-Lem2V9bYilWU6TJ5UxS%2Fgitlab-access-token.png?alt=media\&token=e4f7d4f1-1654-49de-888a-2ba25a63a67f)

Once generated, copy the personal access token to your clipboard and go back to the PullRequest Proxy UI with the GitLab Settings modal open.

### Add Posting User to Proxy

Enter **PullRequest** as the PullRequest Username (or whatever name was used in GitLab).

{% hint style="warning" %}
Make sure the **PullRequest Username** is spelled exactly as the username of the PullRequest user that was created. We highly recommend "PullRequest" (all one word, PascalCase) to maintain communication consistency.
{% endhint %}

### Add Personal Access Token to Proxy

Paste the Personal Access Token into the modal and click **Update**.

![](https://1378996070-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LelcHIfjrgdiAjf_MQX%2F-LelxKfqmQVft3qo-6gr%2F-Lem39oO5duuVrb7n2CW%2Fgitlab-settings-personal-access-token.png?alt=media\&token=c9dd25bd-3abd-4b8a-b357-29b7db05cf71)

## Verify Connection

Open the **Repositories** tab in the left sidebar. The repositories the PullRequest GitLab user were added to should appear in a list here.

![](https://1378996070-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LelcHIfjrgdiAjf_MQX%2F-LelxKfqmQVft3qo-6gr%2F-Lem6n8ImYsalXBTmgQm%2Fverify-connection-gitlab.png?alt=media\&token=00b7b3fd-cda7-4548-942d-81126877d8f7)
