License Type | SaaS & On-Premise |
Agent Mode | Assess |
Main Product Category | Contrast Plugins |
Sub Category | Configuration |
Issue
When I configure the contrast Plugin for IntelliJ and finally I press the button "Add" I get this error message:
Connection failed! sun.security.validator.ValidatorException: PKIX path building failed:sun.security.provider.certpath.SunCertPathBuilderExceptions: unable to find certification path to requested target.
Cause
This message means that the certificate used on your TeamServer is not trusted by the JRE used by IntelliJ. To resolve it, you must add the certificate used on the TeamServer to the keystore that IntelliJ is using.
Resolution
1. In your browser, go to TeamServer and click on the padlock icon in the address bar to examine the certificate
2. Go to the **Details** tab
3. Click **Copy to File…,** then accept the default options with **Next -> Next** and now specify a location to save the certificate e.g. your Desktop
4. Find the folder where the IntelliJ Java is installed. This will usually be at **C:\Program Files\JetBrains\IntelliJ <version>\jre64\bin**
5. Open a Command Prompt window and change to the above path up to: **`cd C:\Program Files\JetBrains\IntelliJ <version>\jre64\bin`**
6. Use the keytool command to add the certificate to the keystore:
keytool.exe -import -trustcacerts -noprompt -keystore ..\lib\security\cacerts -storepass changeit -alias ContrastTeamServer -file <path to .cer file saved from step 3>