Maven使用中PKIX path building failed: unable to find valid certification path to requested target问题解决

问题描述

在Eclipse中创建Maven项目,或者使用Maven从特定的远程仓库下载jar包时 ,得到下面的错误信息:
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from … was cached in the local repository, resolution will not be reattempted until the update interval of … has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to …: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

原因分析

用户配置文件settings.xml中设置了远程仓库,但是没有设置代理,导致连接远程仓库时,找不到对应的有效证书,认为是不可信站点,于是抛出这个错误信息。

解决方法

目的让JRE信任这个证书,把该远程仓库地址的证书导入到JRE的证书库中。

  1. 在浏览器上访问远程仓库地址,然后通过浏览器将证书导出。步骤如下&#x
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值