SonarQube over https
我正在尝试将SonarQube与TFS 2013版本集成。SonarQube 实例配置为使用 https。由于某种原因,TFS在尝试联系SonarQube时会抛出以下错误:
ERROR: Error during SonarQube Scanner execution <br /> 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
我发现这个SO帖子:“PKIX路径构建失败”和“无法找到请求目标的有效证书路径”,并导出证书并使用keytool将其导入java密钥库。我仍然收到相同的错误。似乎sonarQube不知何故没有从默认的java密钥库中获取证书。
我尝试手动运行声纳扫描程序并在参数中传递证书信息,但它仍然没有获取证书。
C:\SonarScanner\sonar-scanner-3.2.0.1227\bin>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"
有什么建议吗?