SonarScanner MSBuild ignores client certificate

1,091 views
Skip to first unread message

pante...@gmail.com

unread,
Feb 8, 2018, 2:48:59 AM2/8/18
to SonarQube
I am trying to use MSbuild to scan a ,NET project.

Following the guidelines indicated here.

However, the ms build scanner fails to acknowledge the client certificate:


    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




duncan.po...@sonarsource.com

unread,
Feb 8, 2018, 10:37:12 AM2/8/18
to SonarQube
Reply all
Reply to author
Forward
0 new messages