I want to run a SonarQube analysis of a .NET
project.
I have set up a docker image with the prerequisites described here.
When following the instructions:
mono /msbuild/SonarQube.Scanner.MSBuild.exe begin /d:sonar.login=<my-sonarqube-secret-token> /k:somenameipasshere
SonarQube Scanner for MSBuild 4.0.2
Default properties file was found at /msbuild/SonarQube.Analysis.xml
Loading analysis properties from /msbuild/SonarQube.Analysis.xml
Pre-processing started.
Preparing working directories...
16:49:01.29 Updating build integration targets...
16:49:01.305 Fetching analysis configuration settings...
16:49:01.433 Failed to request and parse 'https://myserver.sonarqube.local/api/server/version': Error: TrustFailure (One or more errors occurred.)
16:49:01.433 A server certificate could not be validated. Possible cause: you are using a self-signed SSL certificate but the certificate has not been installed on the client machine. Please make sure that you can access https://myserver.sonarqube.local without encountering certificate errors.
16:49:01.434 Pre-processing failed. Exit code: 1
... but
# keytool -import -file /sonar-scanner/certs/myserver.sonarqube.local.crt -keystore /sonar-scanner/jre/lib/security/cacerts -alias myserver.sonarqube.local -storepass <somepass> -noprompt
keytool error: java.lang.Exception: Certificate not imported, alias <myserver.sonarqube.local> already exists