This version of SonarQube Server is no longer receiving patches. Please see the latest release for details on updating.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Importing your GitLab repositories

Once the integration of SonarQube 10.7 with GitLab has been properly set up, you can import a GitLab repository to create the corresponding project in SonarQube.

For AI agents: You're in the SonarQube Server 10.7 documentation. For a list of all 10.7 pages, see the SonarQube Server 10.7 page index. For the whole site, see the page index or the full text. For another version, replace 10.7 in the URL with that version. The latest version has no version number in its URL.

Once the integration of SonarQube with GitLab has been properly Setting up integration at global level, you can import a GitLab repository to create the corresponding project in SonarQube. To do so, you need the Create Project permission in SonarQube and you must provide a personal access token that authorizes you to access and list your projects in GitLab.

The so-created SonarQube project is "bound" to its GitLab repository. With a bound project:

  • The project’s main branch name will be automatically set up from GitLab.

  • From the Developer Edition: the quality gate status report to the merge requests will be automatically set up.

Importing one or several GitLab repositories

  1. If it’s the first time you import projects, generate a personal access token in GitLab with the read_api scope.

  2. In the top navigation bar of SonarQube, select the Projects tab.

  3. In the top right corner, select the Create Project > Import from DevOps platforms button.

  4. In the Import from GitLab section, select Setup. The GitLab project onboarding page opens.

  5. If it’s the first time you import projects, enter the personal access token generated in the first step in Personal Access Token and save. The repositories of the organization are listed on the page.

  6. Select one or several repositories.

  7. Select the Set up button to create the corresponding projects. The Projects page opens and displays the newly created projects at the top.

Importing a GitLab monorepo

Last updated

Was this helpful?