无法在 org.bouncycastle:bc-fips:jar:1.0.2.3 收集依赖项
当我尝试使用 Jenkins 构建项目时出现错误,
> [ERROR] Failed to execute goal on project luwak-task-storage: Could not resolve dependencies for project
> com.trendmicro.luwak:luwak-task-storage:jar:3.0.0-SNAPSHOT: Failed to
> collect dependencies at org.bouncycastle:bc-fips:jar:1.0.2.3: Failed
> to read artifact descriptor for org.bouncycastle:bc-fips:jar:1.0.2.3:
> Could not transfer artifact org.bouncycastle:bc-fips:pom:1.0.2.3
> from/to central
> (https://nexus.trendmicro.com/nexus/repository/maven-central/):
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to
> find valid certification path to requested target -> [Help 1]
我得到了一个名为 org.bouncycastle:bc-fips:pom:1.0.2.3 的依赖项,它是无法解析的库,但我不知道为什么。 我可以在本地成功构建我的项目,但是当使用 Jenkins 时,我收到此错误。 我读过一些帖子,但没有一个能解决我的问题。请帮忙。
I got an error when I try to build my project using Jenkins
> [ERROR] Failed to execute goal on project luwak-task-storage: Could not resolve dependencies for project
> com.trendmicro.luwak:luwak-task-storage:jar:3.0.0-SNAPSHOT: Failed to
> collect dependencies at org.bouncycastle:bc-fips:jar:1.0.2.3: Failed
> to read artifact descriptor for org.bouncycastle:bc-fips:jar:1.0.2.3:
> Could not transfer artifact org.bouncycastle:bc-fips:pom:1.0.2.3
> from/to central
> (https://nexus.trendmicro.com/nexus/repository/maven-central/):
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to
> find valid certification path to requested target -> [Help 1]
I got a dependency called org.bouncycastle:bc-fips:pom:1.0.2.3, it is the library that cannot be resolved, but I don't know why.
I can build my project successfully on local, but when using Jenkins, I got this error.
I have read some threads but none of them resolve my issue. Please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因为您的服务器还没有该依赖项/库,并且在获取所需的工件之前由于以下原因而失败:
您的系统(Jenkins 服务器)无法从尝试提取工件的位置验证服务器身份,因此无法建立适当的沟通渠道。
如果您认识到&信任目标服务器,然后您可以在 Jenkins 服务器上添加 CA 证书(很可能在 Jenkins 使用的 java 密钥库中)来验证握手过程。
https://stackoverflow.com/a/63491078/9926179
Because your server don't have that dependency/library yet and failed prior to get those required artifacts due to the following reason:
Your system (Jenkins server) is unable to validate the server identity from where it is trying pulling the artifacts and hence unable to establish a proper channel for communication.
If you recognized & trust target server then you can add the CA certs on Jenkins server (most probably in java keystore utilize by Jenkins) to validate the handshake process.
https://stackoverflow.com/a/63491078/9926179