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的更多相关文章

  1. 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: ...

  2. 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 ...

  3. 解决 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 报错PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

    今天在调用第三方HTTPS接口的时候,一直显示这个报错,然后百度很久,有2种解决方法,一个是说自己手动去导入,第二种用代码忽略证书验证.我用二种方式, 复制即用, public void test2( ...

  8. 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// ...

  9. 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 ...

随机推荐

  1. const 常引用

    常类型是指使用类型修饰符 const 说明的类型,常类型的变量或对象的值是不能被更新的. 这篇主要说常引用.常引用是指所引用的对象不能被更新. 在实际应用中,常引用往往用来作为函数的形参,这样的参数称 ...

  2. 论文笔记之:Spatially Supervised Recurrent Convolutional Neural Networks for Visual Object Tracking

    Spatially Supervised Recurrent Convolutional Neural Networks for Visual Object Tracking  arXiv Paper ...

  3. nginx windows 版 创建windows 服务

    使用的工具 Windows Service Wrapper 使用的指令 nginx -s top Windows Service Wrapper  工具的使用: 1. 定义xml 文件: 说明如下: ...

  4. python sys.argv[]

    sys.argv[]是用来获取命令行参数的,是一个由该脚本自身路径和其它输入的参数组成的List.sys.argv[0]表示代码本身文件路径. 这里,当我们执行python using_sys.py ...

  5. html初学(一)

    学习了一些html的基本用法,代码和效果如下: <!DOCTYPE html> <html> <head> <meta charset="utf-8 ...

  6. Swift中的HTTP请求

    iOS开发中大部分App的网络数据交换是基于HTTP协议的.本文将简单介绍在Swift中使用HTTP进行网络请求的几种方法. 注意:网络请求完成后会获得一个NSData类型的返回数据,如果数据格式为J ...

  7. C# ASP.NET基类,常用类库及源代码

    http://code1.okbase.net/codefile/SerializeHelper.cs_2012122018724_118.htm

  8. ORACLE 常用日期函数

    1 . add_months(arg1,num) 返回日期arg1加num个月的新日期. select add_months(date'2011-1-1',1) from dual; result:  ...

  9. eclipse修改工程名

    直接修改工程可能会产生一些莫名其妙的问题,需遵循以下三步: 1. 右键工程:Refactor->Rename,或选中工程按F2,修改名称 2. 右键工程:Properties->Web P ...

  10. SQL开发利器SQL Prompt

    SQL开发利器SQL Prompt 5.1完全破解+使用教程 - keepfool - 博客园 http://www.cnblogs.com/keepfool/archive/2012/05/27/2 ...