Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to bypass SSL verification for Gradle 4.5?

Tags:

java

ssl

gradle

I am getting this error while trying to connect to Nexus Maven proxy repository, but Nexus is running over HTTPS with a self-signed certificate.

How can I bypass SSL verification in this scenario in Gradle 4.5?

sun.security.validator.validatorexception pkix path building failed 
sun.security.provider.certpath.suncertpathbuilderexception: 
  unable to find valid certification path to requested target
like image 847
AniketGole Avatar asked Sep 15 '25 11:09

AniketGole


1 Answers

In my case, we did not have access to import certificates in cacerts. But, we were able to install the certificates in Windows Trusted Root Certification Authority. In gradle.properties, after adding below 2 properties, I was able to override cacerts and get over the SSL issue

systemProp.javax.net.ssl.trustStore=C:\\Windows\\win.ini
systemProp.javax.net.ssl.trustStoreType=Windows-ROOT
like image 123
Sourabh Avatar answered Sep 17 '25 01:09

Sourabh