JetBrains / TeamCity.SonarQubePlugin

A plugin for TeamCity server allowing you to configure and run SonarQube analysis from the CI
Apache License 2.0
53 stars 32 forks source link

Connect to SonarQube server with HTTPS #57

Open isharasjc opened 5 years ago

isharasjc commented 5 years ago

Hi,

My Sonar server is HTTPS enabled through SSL/TLS, after changing the server to https sonar scan begin is failing.

[05:47:47] : [Step 2/8] 05:47:47.36 Updating build integration targets... [05:47:47] : [Step 2/8] 05:47:47.371 Fetching analysis configuration settings... [05:47:47]W: [Step 2/8] 05:47:47.422 Failed to request and parse 'https://sonar.xxxxxxxxxxxxxxxxxx.com/api/server/version': The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. [05:47:47]W: [Step 2/8] 05:47:47.423 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://sonar.xxxxxxxxxxxxxxxxxx.com without encountering certificate errors. [05:47:47]W: [Step 2/8] 05:47:47.423 Pre-processing failed. Exit code: 1 [05:47:47]W: [Step 2/8] Process exited with code 1 [05:47:47]E: [Step 2/8] Process exited with code 1 (Step: SonarScanner Begin (SonarScanner for MSBuild: begin analysis)) [05:47:47]E: [Step 2/8] Step SonarScanner Begin (SonarScanner for MSBuild: begin analysis) failed [05:47:47]W: Step 3/8: Debug Build (MSBuild)

How can I fix this, I already added the .pem file to TeamCity Administration->Root Project->SSL / HTTPS Certificates.

Thanks, Ishara G.

Tarig0 commented 4 years ago

Ensure the JRE installed on the server has the PEM installed, in its keystore

We used the Zip tool installer to deploy Openjdk with a modified keystore to allow us to utilize the https end point