# Introduction

SonarQube Server’s integration with GitLab self-managed and GitLab SaaS subscriptions allows you to maintain code quality and security in your GitLab projects.

With this integration, you’ll be able to:

* Authenticate with GitLab: Sign in to SonarQube Server with your GitLab credentials.
* Import your GitLab repositories: Import your GitLab Projects into SonarQube Server to easily set up SonarQube Server projects.
* Analyze projects with GitLab CI/CD: Integrate analysis into your build pipeline. Starting in [Developer Edition](https://www.sonarsource.com/plans-and-pricing/developer/), SonarScanners running in GitLab CI/CD jobs can automatically detect branches or merge requests being built so you don’t need to specifically pass them as parameters to the scanner.
* Report your quality gate status to your merge requests: Starting in [Developer Edition](https://www.sonarsource.com/plans-and-pricing/developer/), see your [Quality gates](/sonarqube-server/10.8/instance-administration/analysis-functions/quality-gates.md) and code metric results right in GitLab so you know if it’s safe to merge your changes.
* Report security vulnerabilities in GitLab: Display security issues found by SonarQube Server as vulnerabilities in the GitLab interface.
* Manage your monorepos: Import your monorepo into SonarQube Server to easily manage the related projects.

{% hint style="info" %}
To integrate SonarQube Server with GitLab self-managed subscriptions, we recommend using [GitLab version 15.6+](https://about.gitlab.com/releases/2022/11/22/gitlab-15-6-released/).
{% endhint %}

{% hint style="info" %}
You can also check out this [video](https://www.youtube.com/watch?v=XX0ey4rRvms) on GitLab integration.
{% endhint %}

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Setting up integration at global level](/sonarqube-server/10.8/devops-platform-integration/gitlab-integration/global-setup.md)\
  This section explains how to set up the integration of SonarQube Server with GitLab. You need the global Administer System permission in SonarQube to perform this setup.
* [Importing your GitLab repositories](/sonarqube-server/10.8/devops-platform-integration/gitlab-integration/importing-repos.md) Server\
  Once the integration of SonarQube Server with GitLab has been properly set up, you can import a GitLab repository or monorepo to create the corresponding projects in SonarQube Server.
* [Setting up GitLab integration at project level](/sonarqube-server/10.8/devops-platform-integration/gitlab-integration/setting-up-at-project-level.md)\
  This page explains how to set up merge request decoration and the blocking of merge requests in case of quality gate failure. You need the Administer permission on the project to perform this setup.
* [Adding analysis to GitLab CI/CD pipeline](/sonarqube-server/10.8/devops-platform-integration/gitlab-integration/adding-analysis-to-gitlab-ci-cd.md)\
  Once you have created your project(s) in SonarQube Server, you can add the SonarQube Server analysis to your GitLab CI/CD pipeline, in a standard case and in the case of a monorepo. Note that the report of security vulnerabilities in GitLab is set up through the pipeline.


---

# 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://docs.sonarsource.com/sonarqube-server/10.8/devops-platform-integration/gitlab-integration/introduction.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.
