Authenticate SonarQube Using GitLab

Good morning!

Describe your question in as much detail as possible:
I would like to use GitLab to authenticate my SonarQube users. I followed these instructions from SonarQube: for authenitcating using GitLab.

GitLab and SonarQube both sit on the same server. GitLab is on port 80 while SonarQube is on port 9000. I am not using ssl. So GitLab is browsable at http://myIp and SonarQube is browsable at http://myIp:9000.

Per the directions from SonarQube I enter a redirect URL of http://myIp:9000/oauth2/callback/gitlab

When I click Login with GitLab from SonarQube it brings me to my GitLab users settings page with an error message of The redirect URI included is not valid.

Am I missing something with my URI?

  • What are you seeing, and how does it differ from what you expect to see?
    I expected to be able to login using GitLab as I do with gitlab-mattermost (the mattermost that comes packaged with GitLab).

  • Consider including screenshots, error messages, and/or other helpful visuals

  • What version are you on (Hint: /help) ? and are you using self-managed or
    I am using a self hosted GitLab 12.10.6 ce and a self hosted SonarQube 8.3 ce

For anyone coming back here in the future: check your SonarQube Server URL. Login with admin, go to Administration > General > Server base URL
Set it to your server URL and save, it should be working now.