# Cause: Unable to find valid certification path to requested target

**URL:** <https://discuss.gradle.org/t/cause-unable-to-find-valid-certification-path-to-requested-target/19210>\
**Category:** Plugin Portal\
**Created:** [August 26, 2016, 7:25am UTC](https://discuss.gradle.org/t/cause-unable-to-find-valid-certification-path-to-requested-target/19210 "2016-08-26T07:25:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijaymohite](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vijaymohite](https://discuss.gradle.org/u/vijaymohite)\
**Post date:** [August 26, 2016, 7:25am UTC](https://discuss.gradle.org/t/cause-unable-to-find-valid-certification-path-to-requested-target/19210/1 "2016-08-26T07:25:44Z")

</div>

I have following script in my gradle.build file:  
buildscript {  
repositories {  
jcenter()  
mavenCentral()  
}  
dependencies {  
classpath ‘com.github.jengelman.gradle.plugins:shadow:1.2.3’  
}  
}

apply plugin: 'java’  
apply plugin: ‘com.github.johnrengelman.shadow’

I am working behind proxy  
I have provided proxy host,port,username,password in gradle vm options in intellij idea editor as well as I have provided the same details in gradle.properties file located at project root folder.  
Then I imported the certificate for shadow.jar from site:  
[https://jcenter.bintray.com/com/github/jengelman/gradle/plugins/shadow/1/2/3](https://jcenter.bintray.com/com/github/jengelman/gradle/plugins/shadow/1/2/3)

Then I added this certificate in certficate-store cacerts located at %java\_home%/jre/lib/security

Even then it is not working and giving me certificate issue while resolving the dependency specified in classpath in gradle.build file

---

<div class="post-metadata">

**Author:** ![lmyaxx](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@lmyaxx](https://discuss.gradle.org/u/lmyaxx)\
**Post date:** [October 6, 2019, 7:07am UTC](https://discuss.gradle.org/t/cause-unable-to-find-valid-certification-path-to-requested-target/19210/2 "2019-10-06T07:07:09Z")

</div>

I have the same problem on Windows10, I also added the corresponding certificate in certficate-store cacerts located at %java\_home%/jre/lib/security ,but it doesn’t work !  
my java version is 1.9 and my maven version is 5.6.2

---

<div class="post-metadata">

**Author:** ![anismekbal](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@anismekbal](https://discuss.gradle.org/u/anismekbal)\
**Post date:** [April 8, 2025, 8:37am UTC](https://discuss.gradle.org/t/cause-unable-to-find-valid-certification-path-to-requested-target/19210/3 "2025-04-08T08:37:13Z")

</div>

do you have found a resolution for this issue ? I think it is related to the company’s network restrictions.

---

<div class="post-metadata">

**Author:** ![Vampire](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/vampire/32/9082_2.png) [@Vampire](https://discuss.gradle.org/u/Vampire)\
**Post date:** [April 8, 2025, 1:25pm UTC](https://discuss.gradle.org/t/cause-unable-to-find-valid-certification-path-to-requested-target/19210/4 "2025-04-08T13:25:55Z")

</div>

> PKIX path building failed

Usually means that either your Java installation is “broken”, missing the according trusted root certificates, or that on that URL something is answering with a non-valid HTTPS certificate, either due to a man-in-the-middle attack, or due to some Proxy in the network showing you some information that is not coming from the original URL.

Enabling `--info` or `--debug` could help get further information on what is actually returned from the URL.  
Or you can add `-Djavax.net.debug=all` to your Gradle commandline so that the HTTPS communication details are logged. You might want to pipe this to a file as it will produce large output. It will for example show which certificates are sent by the server and so on and should help investigating this.

Often - especially if you can open the URL in your browser - this means that you need to use some proxy to access the outworld from your network, but you did not configure Gradle to use that proxy..
