maven PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path
maven编译的时候遇到的奇葩问题, 非常奇葩, 所有其他同事都没有遇到 , 仅仅是我遇到了
不清楚是因为用了最新的JDK的缘故(1.8 update91)还是其他什么原因. 总之是证书的问题.
当时的情况是maven去公司的nexus中心下文件 , nexus是以https开头的地址.下载的时候就出现了上面的问题.
解决办法如下 :
1.下载证书
1.1在web浏览器上(这里我用的是chrome)打开https的链接,然后点击https前面的小锁头,然后点详细信息.就可以看到右侧有一些信息.然后点击view certificate.直接拖拽证书的图标到一个路径,就保存下来了.这里我的文件叫nexus.rc.dataengine.com.cer
2.进入JDK的security路径
cd $JAVA_HOME/jre/lib/securiy
3.执行命令导入证书
sudo keytool -keystore cacerts -importcert -alias nexussecureca -file /Users/kane/nexus.rc.dataengine.com.cer
遇到输入口令的情况 , java的默认口令是changeit
maven PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path的更多相关文章
- Maven:sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
还是记录使用 maven 时遇到的问题. 一.maven报错 maven package 进行打包时出现了以下报错: Non-resolvable parent POM for com.wpbxin: ...
- mvn 编译报错mavn sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targ
mavn 编译报错: mavn sun.security.validator.ValidatorException: PKIX path building failed: sun.security.p ...
- 解决 java 使用ssl过程中出现"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
今天,封装HttpClient使用ssl时报一下错误: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorExc ...
- java程序中访问https时,报 PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
在java中使用https访问数据时报异常: Caused by: sun.security.validator.ValidatorException: PKIX path building fail ...
- Flutter配置环境报错“PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”
背景:最近看了很多Flutter漂亮的项目,想要尝试一下.所有环境都搭建好之后,按照文档一步一步配置(抄袭),但始终报如下图错误. PKIX path building failed: sun.sec ...
- PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
注:网上搜来的快照,暂未验证 在java代码中请求https链接的时候,可能会报下面这个错误javax.net.ssl.SSLHandshakeException: sun.security.vali ...
- 报错PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
今天在调用第三方HTTPS接口的时候,一直显示这个报错,然后百度很久,有2种解决方法,一个是说自己手动去导入,第二种用代码忽略证书验证.我用二种方式, 复制即用, public void test2( ...
- ES访问遇到sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
cmd命令cd到jre/bin目录下 输入命令keytool -import -alias 别名 -keystore cacerts -file C://certs//elasticsearch// ...
- sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
httpclient-4.5.jar 定时发送http包,忽然有一天报错,http证书变更引起的. 之前的代码 try { CloseableHttpClient httpClient = build ...
随机推荐
- SpringMVC @Value取值(取properties属性文件的属性值)
@Controller @RequestMapping("/reg") public class RegController extends BaseController { @V ...
- SQL Server AlwaysOn articles
Troubleshooting SQL Server AlwaysOn http://download.microsoft.com/download/0/F/B/0FBFAA46-2BFD-478F- ...
- Unity摄像机
把相机做为人物的子对象,就可以制作: 1.第1人称摄像机:把摄像机摆在眼睛前面 2.第3人称摄像机:把摄像机摆在人后上面 Clear Flags: http://www.haogongju.net/a ...
- Phython 学习笔记之——类的初步认识
类是面向对象编程的核心,他扮演相关数据及逻辑容器的角色.他们提供了创建实例对象的蓝图.因为python语言不要求必须以面向对象的方式编程(与JAVA不同),这里简单的举一个例子. 如何定义一个类 cl ...
- linux服务之openfiler
架构:b/s 服务器端:封装好的linux系统 客户端:浏览器 相关包:封装好的linux系统 Openfiler imports user and group information from ce ...
- bugFree与zentao
架构:b/s 开发语言:php 服务器端:lamp 客户端:浏览器 相关包:lamp BugFree是借鉴微软的研发流程和Bug管理理念,使用PHP+MySQL独立写出的一个Bug管理系统.简单实用. ...
- Struts2中s:set标签和s:if标签小结
1. s:set标签 格式:<s:set name="" value="" scope=””/> 说明:把jsp页面中的一个值,以name存储起来 ...
- html中间块居中宽度自适应
说来,这个其实不是个多难的事情,但是,若没有经验或者没有了解过html原数在浏览器中显示的顺序,可能还真是个问题,不知如何调整. 先说明下,在确定了左右两边显示的块的宽度后,再让中间块的宽度自适应,这 ...
- Panel扩展 圆角边框,弧形边框
using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; u ...
- 【shell】条件判断式
条件判断式的表示格式: 文件判断式: [root@andon ~]# [ -e /root/1 ] && echo yes || echo no #注意[]里面的空格,第一个命令为真打 ...