nice-florist-55958
09/06/2024, 9:39 PMcs fetch
, leading to TLS/SSL issues when trying to download nailgun
from our Maven repository for instance (running pants packcage
):
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
The issue is documented at https://github.com/coursier/coursier/issues/1977 and the suggested workaround is to use the JAR launcher instead: java -jar coursier.jar fetch ...
. When I do that, the cs fetch
command Pants was trying to run works fine, since it's using the intended JRE with the necessary keystore/truststore. Note that this problem arises even when Coursier also knows about the correct JRE (cs java-home
or cs java -version
all report the expected JRE, but it's not using this for fetch
, etc.).
I guess my question is 1) Does anyone know how to fix this with Coursier itself (in such a way that is compatible with Pants' current usage/invocations) or 2) Is it possible to make Pants use the JAR launcher approach?nice-florist-55958
09/07/2024, 3:22 PM-J-<Java Option>
s to the fetch
commands, which are apparently passed to its internal JRE. It doesn’t look like Pant’s Coursier backend supports passing custom args; could that feature be added (or a configuration specifically for passing -J-Djavax.net.ssl.trustStore
and related options)? In the meantime I’ll see how far I get by trying to abuse the known versions configuration and point Pants to a script that adds these options to its Coursier calls.nice-florist-55958
09/07/2024, 6:35 PMbroad-processor-92400
09/11/2024, 3:39 AMnice-florist-55958
09/11/2024, 10:50 AM