java - maven 存储库 sun.security.validator.ValidatorException : PKIX path building failed: sun. security.provider.certpath.SunCertPathBuilderException:

标签 java maven

我有 pom.xml 的片段,它试图解决 fitbit 依赖关系:

<repositories>
        <repository>
            <name>FitBit GitHub Repo</name>
            <id>fitbit4j</id>
            <url>https://nexus.vanntett.net/content/repositories/fitbit/</url>
        </repository>
    </repositories>

我收到以下错误:

Failed to collect dependencies at com.fitbit:fitbit4j:jar:1.0.26: Failed to read artifact descriptor for com.fitbit:fitbit4j:jar:1.0.26: Could not transfer artifact com.fitbit:fitbit4j:pom:1.0.26 from/to fitbit4j (https://nexus.vanntett.net/content/repositories/fitbit/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]

我在eclipse中使用了这些参数: -Dmaven.wagon.http.ssl.insecure=true - Dmaven.wagon.http.ssl.allowall=true

这没用。

请帮忙。

谢谢

最佳答案

您需要在 java cacert 文件中输入您的证书,请确保您选择的是根 ca 证书,而不是层次结构中的最后一个。

This链接展示它最好。

第一步:下载证书 第 2 步:存储在 cacert 中

就是这样!您的问题已解决。

关于java - maven 存储库 sun.security.validator.ValidatorException : PKIX path building failed: sun. security.provider.certpath.SunCertPathBuilderException:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37710721/

相关文章:

java - @Named 的行为与 @ManagedBean 不同

Java FreeTTS 缺少语音

maven - Tycho 构建的更新站点在重新构建后仍然包含错误的依赖项

maven - 使用 Maven 在瘦 WAR 中包含特定的 JAR 文件

java - 使用java和maven打开文件

java - 在 json 文件中查找预定义架构属性的最佳方法

java - 解析时调用 SAX error() 处理程序方法,但没有抛出异常 - 为什么?

java - Android - 调用 "finish()"不会触发 onDestroy

java - Bean 验证 + 数据库访问 + 断言

java - 使用 Maven 将 gwt 客户端代码编译为 javascript