I have been trying incessantly to integrate sonarqube with a self-hosted private enterprise-based gitlab server with its own self-signed certificate. I have been facing an issue while authenticating gitlab from sonarqube through Administration > Authentication > Gitlab. The url of the gitlab instance is not “https://www.gitlab.com” so i did not use gitlab.com/api/v4 and changed the api url accordingly. After entering the personal access token , I got an error message “Could not validate gitlab url” etc. And when i checked logs, it said certificate not valid. So, i added the gitlab server certificate to my keystore which redirects to the /lib/security/cacerts for the java binary which i am using for my sonarqube instance. I added the certificate and verified if its present by checking the serial number. But now,even after adding the certificate and restarting the sonarqube server.I retried all the previous steps but still facing he same issue and getting the error message “Could not validate url”. Please assist as I am not sure what’s going wrong here.
Hi,
Welcome to the community!
You bypassed the topic template here. It’s there to prompt you for information that may be useful in helping you.
What version of SonarQube are you using?
Ann
Hey, Thanks for the response. I am using 10.8
Hi,
Can you check your page footer? We’re currently working on releasing 10.3.
Ann
It’s 10.2.1.78527
Hi,
Thanks.
Can you check this post?
HTH,
Ann
Of course, I got the same error message from web.log and later added the site certificate to keystore and restarted the sonqrqibe server but still facing the same issue and error. I rechecked if they self-signed certificate was added to keystore and verified the same but still facing the same issue.
Hi,
Sorry, but getting your self-signed certificates settled is really a bit out of scope for us.
Ann
Thanks for the response.The issue with the self-signed certificate has already been settled, and has been added to the keystore. Infact, the post that you had mentioned earlier clearly mentions the need for this step in order for sonarqube to recognize. The problem is why does n’t sonarqube recognize gitlab inspite of the certificate being added to keystore.
Hi,
So if the certificate question is settled, then what’s the current error? (UI and logs, please.)
Ann
Hi,
Partial screenshots of logs are generally unhelpful. Fortunately this one does capture the crux:
PKIX path building failed
This remains a problem with your certificate.
Because it’s self-signed, it’s possible you have to do more than simply adding it alone.
Ann
When it comes to the self-signed certificate aspect, almost all threads, blogs and potentials solutions involve adding the certificate to Keystore. So, I believe the certificate has been addressed however as you had said there’s a possibility that something could be missing. Kindly guide and assist regarding what could be done from sonarqube side or any other remedy.