> For the complete documentation index, see [llms.txt](https://docs.release.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.release.com/integrations/source-control-integrations/gitlab.md).

# GitLab

To use your GitLab repositories with Release, choose the "Sign in with GitLab" option. You'll be prompted to authorize Release for read/write access to the API.

![GitLab authorization](https://585411240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1neGLLQ0sDXeK6ooSo%2Fuploads%2Fgit-blob-582574a92d70c7dc9da158b2481999319b6a3f5c%2Fauthorize-gitlab.png?alt=media\&token=0f7b3700-91c7-4354-941f-782de548cf10)

Note that can you authenticate with multiple different source providers (for example, GitHub and GitLab). If you use the same email address for those providers, you will see a combined view of repositories for all providers, and each integration will appear separately on your user profile page.

![multiple integrations](https://585411240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1neGLLQ0sDXeK6ooSo%2Fuploads%2Fgit-blob-ba7c2913505104003950171dd66a504d22a42dcc%2Fmultiple-integrations-2.png?alt=media)

## Self-hosted GitLab

It is possible to connect Release with your self-hosted GitLab with a few extra steps. It requires some configurations on the GitLab side as well as some custom configuration on Release.

To get started, you'll need to create an application on your GitLab server. Assuming your installation is pointed at `https://gitlab.selfhosted.com`, you will need to create an application by going to `https://gitlab.selfhosted.com/-/profile/applications`. The Applications form should look something like this:

![GitLab Application](https://585411240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1neGLLQ0sDXeK6ooSo%2Fuploads%2Fgit-blob-e21d83e4f05d0ba3d799dd8b6012b12cedab2006%2Fgitlab-application.png?alt=media\&token=38fe38ee-6606-4ac8-aeca-9f960276e75a)

You can name the Application however you'd like, but for clarity, you can name it `Release`. Then, you'll need to whitelist a callback URL that will be used by GitLab to finish the OAuth handshake. You'll also need to set the scopes so that Release has the right permissions level to interact with your repositories.

* Redirect URI: `https://api.release.com/auth/callback`
* Scopes: `api`

Once you save the application, you'll be presented with information about your application. There will be an application ID and a secret ID. *You will need those in the next step*.

Return to Release and open the [User Profile](https://app.release.com/admin/user-profile). You will be presented with all the version control tools that are currently supported by Release. For GitLab integration, you'll need to configure the section called "GitLab - Self Hosted". Click on **Configure** and enter the application ID, secret ID, and URL for your GitLab server. Given the example URL above, it would look like this:

* URL: <https://gitlab.selfhosted.com>
* Application ID: ID from the save screen on GitLab
* Client Secret: Secret from the save screen on GitLab

Save the configuration and a new button will appear to connect to your application. Click on the button and you will be redirected to your GitLab Enterprise authorization page. When you first integrate Release with GitLab, you may see a warning page on GitLab asking you to confirm that you want to use the application you created above.

![GitLab Authorization](https://585411240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1neGLLQ0sDXeK6ooSo%2Fuploads%2Fgit-blob-054fad0d591337762b3aeffe48ab1cc5d7c31a59%2Fgitlab-authorization.png?alt=media\&token=66878cda-8c96-4e8a-83bb-c746da338e13)

Authorize the application, and you'll be redirected to Release to start using your GitLab repositories with Release.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.release.com/integrations/source-control-integrations/gitlab.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
