Sonatype Nexus - 无法找到所请求目标的有效证书路径

 Linda--林琳 发布于 2023-02-05 11:09

我正在使用当地的Sonaty Nexus,我在其中代理几个外部Maven存储库.到目前为止仅代理了http存储库,但对于一些工件,我不得不介绍Camunda.使用Nexus远程内容浏览器,我可以浏览其内容,但Nexus不会下载其索引.更重要的是,在nexus日志中出现以下错误:

2014-01-08 11:44:27 WARN  [xy-3-thread-218] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Remote peer of proxy repository "Camunda Secure" [id=camunda.secure] threw a org.sonatype.nexus.proxy.RemoteStorageException exception. Connection/transport problems occured while connecting to remote peer of the repository. - Cause(s): Transport error while executing GET method [repositoryId="camunda.secure", requestPath="/", remoteUrl="https://app.camunda.com/nexus/content/groups/public/"] > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target > unable to find valid certification path to requested target
2014-01-08 11:44:44 ERROR [tp13549765-1372] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Got RemoteStorageException in proxy repository "Camunda Secure" [id=camunda.secure] while retrievingremote artifact "ResourceStoreRequest(requestPath="/.meta/repository-metadata.xml")" from URL https://app.camunda.com/nexus/content/groups/public/, this is 1 (re)try, cause: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2014-01-08 11:44:44 ERROR [tp13549765-1372] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Got RemoteStorageException in proxy repository "Camunda Secure" [id=camunda.secure] while retrievingremote artifact "ResourceStoreRequest(requestPath="/.meta/repository-metadata.xml")" from URL https://app.camunda.com/nexus/content/groups/public/, this is 2 (re)try, cause: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2014-01-08 11:44:44 ERROR [tp13549765-1372] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Got RemoteStorageException in proxy repository "Camunda Secure" [id=camunda.secure] while retrievingremote artifact "ResourceStoreRequest(requestPath="/.meta/repository-metadata.xml")" from URL https://app.camunda.com/nexus/content/groups/public/, this is 3 (re)try, cause: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2014-01-08 11:44:44 WARN  [tp13549765-1372] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Remote peer of proxy repository "Camunda Secure" [id=camunda.secure] threw a org.sonatype.nexus.proxy.RemoteStorageException exception. Connection/transport problems occured while connecting to remote peer of the repository. - Cause(s): Transport error while executing GET method [repositoryId="camunda.secure", requestPath="/.meta/repository-metadata.xml", remoteUrl="https://app.camunda.com/nexus/content/groups/public/.meta/repository-metadata.xml"] > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target > unable to find valid certification path to requested target

我该怎么做才能下载其索引并在我的Maven项目中引用这些工件?

SK

2 个回答
  • 底线: -

    您的maven无法在密钥库中找到它尝试连接的服务器的证书,例如foo.domain.com.

    解决的步骤

    1)确定你的maven正在使用的密钥库 - 这非常重要.因为您可能会继续将证书添加到密钥库,但不会添加到maven查找的那个

    提示: -

    a)如果不涉及特定配置,它应该看起来是JAVA_HOME中的默认JDK密钥库 - caccerts

    b)如果您在/ Users/username /下配置了.mavnerc,这将覆盖默认设置.所以一定要看这里知道它指向的地方

    2)下载证书并使用keytool命令导入到正确的密钥库

    keytool -import -alias alias_name -file certificate_name -keystore keystorelocation
    

    2023-02-05 11:13 回答
  • 您需要将相应的SSL证书导入密钥库.

    在linux上下载证书:

    openssl s_client -showcerts -connect app.camunda.com:443 </dev/null 2>/dev/null|openssl x509 -outform PEM > mycertfile.pem
    

    将证书导入Java密钥库.请参阅https://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html如何操作.

    2023-02-05 11:14 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有