首页 > 解决方案 > 在 Jenkins 中跳过 Maven 的 ssl 证书检查

问题描述

我正在尝试集成 Jenkins maven 插件以从本地连接服务器中提取依赖项。当构建开始时,我最终出现以下错误

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

我试图通过将以下 wagon ssl 属性提供为 MAVEN_OPTS 来禁用它:

-Dmaven.wagon.http.ssl.insecure=true 
-Dmaven.wagon.http.ssl.allowall=true 
-Dmaven.wagon.http.ssl.ignore.validity.dates=true

我还尝试将证书添加到 JVM 的 javahome/lib/security/cacerts。使用钥匙工具

还有什么我应该尝试禁用自签名证书检查的其他事情。

标签: mavenjenkinsnexussonatype

解决方案


推荐阅读