Issue when running Sonar-scanner command


I am using Sonarqube ,Community Edition Version 8.9.1.
This sonarqube is running over https and need certificates to be used to reach to it.

I have a ant project which I am executing in gitlab CI pipeline and I am executing sonar-scanner command on it. But I am not sure how to pass the TLS certs I have. I have a client.pem and client-key.pem file.
Any help will be appreciated.

Hi Lakshay, welcome to the SonarSource Community!

Are you using the sonar-scanner CLI image within the GitLab pipeline? If so, see this link in our docs and go down and expand the section for the SonarScanner CLI. You’ll find a mention of self-signed certificates and you can follow the link to instructions on how to add them.

Hi Jeff,

Thanks for the reply.
I tried following the mentioned steps in the document but unfortunately I am getting same error.

org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis

[42]    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(
[43]    at java.base/ Method)
[44]    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(
[46]    at org.sonarsource.scanner.api.EmbeddedScanner.doStart(
[47]    at org.sonarsource.scanner.api.EmbeddedScanner.start(
[48]    at org.sonarsource.scanner.cli.Main.execute(
[49]    at org.sonarsource.scanner.cli.Main.main(
[50]Caused by: java.lang.IllegalStateException: Fail to parse entry in bootstrap index: <!DOCTYPE html>
[51]    at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.parse(
[52]    at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(
[53]    at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(
[54]    at
[55]    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(

Using client.pem and client-key.pem i created a .cer. That .cer file using keytool command provided in the document added to cacerts of the container.
Any idea what could be wrong here?