carlossg / docker-maven

Official Docker image with Maven
Apache License 2.0
528 stars 424 forks source link

Certification path issue when connecting to maven central #223

Open hartman opened 3 years ago

hartman commented 3 years ago

Anyone else have been having issues using the docker container to connect to maven central ? I use 3.8.2-jdk8 (linux/amd64) and recently I get:

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target

when trying to reach repo.maven.apache.org. I noticed that they have a new certificate since sept. 7 and I suspect that the cacerts of upstream doesn't have the right (intermediate?) certificate available ? I just find it weird, because the server does send the intermediate and the root seems fairly old so should already be in cacerts... I thought that was enough. generally....

I proceeded to add the certificates to a command line provided truststore -Djavax.net.ssl.trustStore=file.jks and that did seem to 'fix' the problem, but doesn't seem like a proper solution to me.

bbarry commented 4 months ago

I see that this is quite old but I am getting:

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: 
unable to find valid certification path to requested target

with maven:latest