Tuesday, January 19, 2016

CERTIFICATE - gradle refers to https://plugins.gradle.org and cannot establish connection without proper certificate

The issue is that while importing Gradle project SSL Exception happened.

The matter is that Gradle refers to https://plugins.gradle.org and cannot establish connection without proper certificate.

In order to fix it: install the certificate, which is attached.

1. Open cmd with admin rights,
2. Change to JDK bin directory (for example, C:\Program Files\Java\jdk1.8.0_66\bin>)
3. keytool.exe -import -alias plugins -keystore "C:\Program Files\Java\jdk1.8.0_66\jre\lib\security\cacerts" -file C:\certificats\certificate.cer

EXAMPLE:

keytool.exe -import -alias plugins -keystore "C:\Program Files\Java\jdk1.8.0_66\jre\lib\security\cacerts" -file C:\certificats\certificate.cer

(keystore password: changeit)

No comments: