- 1st I was getting the below error while importing a gradle(springboot) project into eclipse,Unable to download the dependencies from https://repo.spring.io
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
- Downloaded the certificate for https://repo.spring.io in .cer format.
- Then imported the .cer file into JVM(means to cacerts).
Inside
C:\Program Files (x86)\Java\jre1.8.0_261\security\cacerts
and
C:\Program Files\Java\jdk1.8.0_261\jre\lib\security\cacerts
too using the below command-
keytool -import -alias example -keystore "C:\Program Files (x86)\Java\jre1.6.0_22\lib\security\cacerts" -file example.cer
But still the same issue persist
- Then found this and added the below lines in eclipse.ini file to point to the desired path.
-vmargs
-Djavax.net.ssl.trustStore="C:\ProgramFiles\Java\jdk1.8.0_261\jre\lib\security\cacerts"
-Djavax.net.ssl.trustStorePassword="changeit"
And now while running gradle build(to get the dependencies) I am getting below error
org.apache.http.ssl.SSLInitializationException: "C:\ProgramFiles\Java\jdk1.8.0_261\jre\lib\security\cacerts" (The filename, directory name, or volume label syntax is incorrect)
Can anyone please help with this? Thanks in Advance.