Operations 2 min read

How to Install and Configure the SonarQube GitLab Authentication Plugin

This guide explains how to download, install, and configure the SonarQube GitLab authentication plugin, including plugin installation via Maven, setting up a GitLab application with HTTPS, configuring SonarQube authentication parameters, and troubleshooting common redirect URL errors.

DevOps Cloud Academy
DevOps Cloud Academy
DevOps Cloud Academy
How to Install and Configure the SonarQube GitLab Authentication Plugin

“Without accumulating small steps, one cannot reach a thousand miles; without accumulating small streams, one cannot form a river or sea.” — Xunzi

1. Plugin Installation

Sonar plugin URL: https://github.com/gabrie-allaigre/sonar-auth-gitlab-plugin

Install the plugin: download the plugin, package it with Maven, place it into Sonar's plugin directory (/home/sonar/sonarqube/extensions/plugins), and restart SonarQube.

2. GitLab Configuration

Create an application and fill in the SonarQube address (must be HTTPS).

Save the generated authentication key for later SonarQube configuration.

3. SonarQube Configuration

Configuration > GitLab: enable GitLab authentication, fill in the GitLab URL, application ID, and secret.

Login verification: click to log in via GitLab.

FAQ

Q1: GitLab reports a redirect_url error

Description: It redirects directly to a localhost:9000 address, indicating a configuration issue; the configuration was not found on the page.

Solution: Modify the Sonar server configuration file, add the parameter sonar.core.serverBaseURL=https://sonar.demo.com, and restart SonarQube.

Promotion: Taobao store “Program Academy” – store URL: http://ke.itzeyang.com – welcome to follow!

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

ConfigurationDevOpsGitLabAuthenticationSonarQube
DevOps Cloud Academy
Written by

DevOps Cloud Academy

Exploring industry DevOps practices and technical expertise.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.