In Sonarqube, I am attempting to integrate my gitlab instance with sonarqube. To do so, I go to the “DevOps Platform Integrations” section of Sonarqube. For gitlab, I specify the configuration name, Gitlab API URL, and a personal access token.
In “General”, the Server base URL is specified, as well to the Sonarqube website.
I keep getting the response “Could not validate Gitlab URL. Got unexpected answer.” When checking the configuration.
I want to be able to import repositories from my custom Gitlab domain I have up and running with projects. How do I resolve this issue?
I followed this guide: https://docs.sonarsource.com/sonarqube-server/latest/devops-platform-integration/gitlab-integration/global-setup/
The issue is most likely a broken certificate trust chain. To fix the issue:
openssl s_client -connect <gitlab-URL>:443 -servername <gitlab-URL> -showcerts </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > certchain.pem
keytool -import -file certchain.pem -alias customalias -keystore custom.truststore -storepass changeit
<JAVA_HOME>/lib/security/cacerts.