I'm trying to set up a jFrog repository in our project and I'm constantly hitting a wall with various issues.
We have a jFrog repository on XXX.jfrog.io and I've uploaded a whole lot of different artifacts there, but when I declare those dependencies in build.gradle files, gradle is having a hard time downloading them. The jFrog is accessible through company VPN only.
There are three issues here:
"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
But when I declare that same artifact with different version, it downloads it with no issues.
Some artifacts cannot be resolved at all with no errors displayed. Just says cannot be resolved.
For some artifacts, gradle is able to download POM files, but not the jar/aar files. Again, with no apparent error.
I also had issues like this few weeks ago, which got resolved somehow (I have no idea what I did to make this happen), but now again I have these kinds of issues.
What could be the problem, because these issues aren't making any sense at all.
Here is a sample of dependency resolution:
I've tried everything. Complete cleanup of gradle caches, reinstalls of Studio, re-uploading the artifacts to jFrog, even importing server certificates to cacerts file of .Android JDK even though the certificates are already there (I've checked), but to no avail.
When I tap on those links gradle is trying, they open a download task in browser. I also used trace command with CURL to see if there is a problem with the link, but that does not show any issues as well.
Turns out the problem was in intermediate certificates when connected to VPN which weren't present in cacerts file. Upon adding those, it started working.