SonarQube : import Gitlab project

Hello, we are evaluating SonarQube Community 10 and may considering a paid version.

We have deployed SonarQube Community 10.0.0 as a Docker Compose stack with Postgres 13.

We are tried to import a project from Gitlab both self-hosted and gitlab.com into SonarQube but the creation of configuration failed with the following message :

You have the following errors in your configuration:

  • Request was redirected, please provide the correct URL*

The logs of the Web Server of SonarQube contain the message :

ERROR web[AYgO9OJMWEIpOaF1AAAp][o.s.a.c.g.GitlabHttpClient] Gitlab API call to [https://gitlab.com/api/V4/projects] failed with 302 http code. gitlab response content : [You are being redirected.]

Although we have tried with SonarQube Community 9.8 and 9.9 with the same error.

Is this problem known, how to solve it ?

Hi,

Welcome to the community!

I believe this is going to be a problem in your global configuration of GitLab. The docs should help.

 
Ann

Hi Ann,

Thanks for your help, but I found nothing in documentation to solve the issue.

Thibaud

Hi Thibaud,

A 302 is a redirect. So GitLab doesn’t like the URL you’ve given SonarQube. You need to take a closer look at what URL you’ve configured in SonarQube and maybe also talk to your network folks.

 
HTH,
Ann