Hi,
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(IsolatedLauncherFactory.java:85)
[43] at java.base/java.security.AccessController.doPrivileged(Native Method)
[44] at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
[46] at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
[47] at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
[48] at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
[49] at org.sonarsource.scanner.cli.Main.main(Main.java:61)
[50]Caused by: java.lang.IllegalStateException: Fail to parse entry in bootstrap index: <!DOCTYPE html>
[51] at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.parse(BootstrapIndexDownloader.java:59)
[52] at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:44)
[53] at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
[54] at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
[55] at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
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?