title: SonarQube over https
body: <p>I am trying to integrate SonarQube with TFS 2013 builds. The SonarQube instance is configured to use https. For some reason, TFS throws the below error trying to reach out to SonarQube:</p>
  
  <pre><code>ERROR: Error during SonarQube Scanner execution &lt;br /&gt; ERROR: Unable to execute SonarQube ERROR: Caused by: Fail to get bootstrap index from server ERROR: Caused by: sun.security.validator.ValidatorException: PKIX path building failed:Sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target ERROR: Caused by: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target ERROR: Caused by: unable to find valid certification path to requested target
  </code></pre>
  
  <p>I found this SO post: <a href="https://stackoverflow.com/questions/21076179/pkix-path-building-failed-and-unable-to-find-valid-certification-path-to-requ">&quot;PKIX path building failed&quot; and &quot;unable to find valid certification path to requested target&quot;</a> 
  and exported the certificate and used keytool to import it into java keystore. I am still getting the same error. 
  It seems like sonarQube somehow does not pick up the certificate from the default java keystore. </p>
  
  <p>I tried running sonar-scanner manually and passing the certificate information in the parameters but still it does not pick up the certificate. </p>
  
  <pre><code>C:\SonarScanner\sonar-scanner-3.2.0.1227\bin&gt;sonar-scanner.bat -X -Djavax.net.debug="ssl,handshake" -Djavax.net.ssl.trustStore="C:/Program Files/Java/jre1.8.0_121/lib/security/cacerts" -Djavax.net.ssl.keyStore="C:/Program Files/Java/jre1.8.0_121/lib/security/cacerts"
  </code></pre>
  
  <p>Looking at the Debug messages, it hasn't recognized the additional parameters.
  <a href="https://i.stack.imgur.com/LewTX.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/LewTX.jpg" alt="enter image description here"></a></p>
  
  <p>Any suggestions?</p>