Sonnar-scanner-cli on gitlab ci can't connect to self signed sonarqube

Hi,

I am running Gitlab CI integration (sonar-scanner-cli), getting this error -

10:35:41.875 ERROR: SonarQube server [https://sonarqube.dc-infra.***.local] can not be reached
.
.
.
.
.
.
.

Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target


Sonarqube Community EditionVersion 10.1 (build 73491) deployed on on-prem kubernetes.
Gitlab CI image name: sonarsource/sonar-scanner-cli:latest. Gitlab is self hosted (&self signed)

I tried adding the relevant .pem/.crt file from the browser and mount them in to /tmp/cacerts.
Also tried converting it to base64 and adding it as a secret to the sonarqube namespace on the cluster.

Hey there.

Any changes you make will have to be scanner-side (no server-side changes, except not using a self signed certificate, will have an impact).

Can you post your Gitlab YAML file that shows how you’re trying to add certs scanner-side?