. Advertisement .
..3..
. Advertisement .
..4..
When attempting to establish a trusted SSL connection via Artifactory, I get this error ”Unable to find valid certification path to requested target”.
Here is the error message I have gotten:
[ERROR] (o.a.a.r.c.BaseReplicationProducer:97) – Error occurred while performing folder replication for 'XXXX':
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target:
sun.security.validator.ValidatorException:
Has anyone ever faced this problem? How to solve it?
The cause: This error means Artifactory was unable to establish a secure SSL connection using SSL. If you’re using a self-signed certificate or one issued by an internal certificate authority, or if your clients (e.g., browser, Java) are outdated, you can run into this problem.
The solution: Get your root certificate first. Then, (keeping in mind that if you’re working in a HA environment, you’ll need to apply these procedures to all of your nodes), do the following:
openssl s_client -showcerts -connect <REMOTE_URL>:<REMOTE_PORT>
to get the root and intermediate certificates for the remote site. Note: If you’re using the default JVM security setting, this might not be necessary.For example:
This shows that the issuer (i:) and the subject (s:) are the same.
As a result, this certificate is the root certificate. Save the certificate’s hash, being sure to include:
as the root.crt.