工作日志,证书无效 unable to find valid certification path to requested target
工作日志,证书无效 unable to find valid certification path to requested target
最近被这个问题弄得头大。导致所有用到 se.transmode.gradle:gradle-docker:1.2
的项目全部都无法启动!也不知道为什么会这样,其他同事的项目却可以正常打包运行!花了大半天的时间终于折腾好了。
异常情况:
异常日志:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'xxxx'.
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'.
... 91 more
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.github.jnr:jffi:[1.2.1, 1.3.0).
Required by:
project : > se.transmode.gradle:gradle-docker:1.2 > com.github.docker-java:docker-java:0.9.0 > com.github.jnr:jnr-unixsocket:0.3 > com.github.jnr:jnr-ffi:1.0.3
... 110 more
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Failed to list versions for com.github.jnr:jffi.
... 136 more
Caused by: org.gradle.api.resources.ResourceException: Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/com/github/jnr/jffi/maven-metadata.xml.
... 142 more
Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: Could not HEAD 'https://repo.maven.apache.org/maven2/com/github/jnr/jffi/maven-metadata.xml'.
... 149 more
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
... 168 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
... 190 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
... 196 more
解决思路
网上找了一些解决方法,都是导出证书后添加到本地。第一次遇到这个问题,也不知道从哪里导出证书。看到日志中提示Failed to list versions for com.github.jnr:jffi.
。开始怀疑是因为证书失效导致的错误,于是将maven仓库中jffi
的证书导入并添加到本地,重启IDEA后,还是失败了。一瞬间,迷茫了。开始尝试导入其他网址的证书;尝试换gradle docker plugin;连重启电脑的方法都用上了。折腾了好长时间,结果都是以失败告终。
最后又重新看了一遍日志 se.transmode.gradle:gradle-docker:1.2 > com.github.docker-java:docker-java:0.9.0 > com.github.jnr:jnr-unixsocket:0.3 > com.github.jnr:jnr-ffi:1.0.3
抱着try 一 try的心态导入了 jnr-ffi:1.0.3
的证书,结果成功了,心态蹦了。蹦了。了。
具体步骤
第一步:分析日志,列出证书失效的嫌疑jar。
第二步:进入maven 仓库(可能是私服),找到对应的jar页面。
第三步:导出证书到本地
第四步:用管理员身份打开cmd窗口,执行./keytool -import -alias 别名 -keystore cacerts -file 证书地址
命令添加证书,提示“证书已添加到密钥库中”即可。
第五步:重启IDEA
这次的坑给我的教训
日志看仔细。如果一次没有成功,切不可否定自己的观点,多试几次。可以把其他的嫌疑对象,都添加进来。
工作日志,证书无效 unable to find valid certification path to requested target的更多相关文章
- idea使用maven下载jar包,出现证书校验问题问题,unable to find valid certification path to requested target
每次从github上下载下来的项目都报如下错误could not transfer artifact org.springframework.boot:spring-boot-starter-pare ...
- 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 ...
- Android Studio出现:Cause: unable to find valid certification path to requested target问题解决
Android Studio , Flutter , IDEA 工程报错 unable to find valid certification path to requested target 最新解 ...
- 解决PKIX:unable to find valid certification path to requested target 的问题
这两天在twitter服务器上忽然遇到这样的异常: e: sun.security.validator.ValidatorException: PKIX path building failed: s ...
- 解决 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 ...
- 解决PKIX(PKIX path building failed) 问题 unable to find valid certification path to requested target
最近在写java的一个服务,需要给远程服务器发送post请求,认证方式为Basic Authentication,在请求过程中出现了 PKIX path building failed: sun.se ...
- Pop3_解决PKIX:unable to find valid certification path to requested target 的问题
最近有公司pop3协议接收pp邮箱出现异常,连不上服务器,错误内容: e: sun.security.validator.ValidatorException: PKIX path building ...
- unable to find valid certification path to requested target
Error : javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path bu ...
- 解决flutter:unable to find valid certification path to requested target 的问题
1.问题 周末在家想搞搞flutter,家里电脑是windows的,按照官网教程一步步安装好以后,创建flutter工程,点击运行,一片红色弹出来,WTF? PKIX path building fa ...
随机推荐
- Nginx安装与运行
目录 Nginx安装与运行 安装Nginx 运行 注意事项 Nginx安装与运行 安装Nginx 在Nginx官网下载对应的nginx包(推荐使用稳定版[Stable version]) 上传ngin ...
- 最短路径之Dijsktra算法(python)
定义: 起始位置:A 终止位置:F 持久集合:permanent = set() 暂时集合:temporary = set() 首先将起始位置A加入永久集合,并将A的距离设为0, 此时遍历A的邻接节点 ...
- 从. NET 和 Java 之争谈 IT 这个行业
一.有些事情难以回头 开篇我得表名自己的立场:.NET JAVA 同时使用者, 但更加偏爱. NET. 原因很简单 NET 语言更具开放性, 从开源协议和规范可以看出; 语言更具优势严谨; 开发工具 ...
- C# ThreadPool 线程池
Thread与ThreadPool Thread: .NetFramework1.0 对线程对象的一个封装 Thread方法很多很强大,但是太过强大,而且没有限制 功能繁多,反而用不好--就像给4岁 ...
- C#/.Net开发入门篇(3)——console类的输入输出
相信看了我上一篇文章的小伙伴们都知道console这个类的最基本的2个方法了吧,下去练习过的小伙伴应该能知道4个方法. 那么下面我们就来介绍一下上期没有介绍完的另外2个方法Console.WriteL ...
- ES-索引管理
参考: https://es.xiaoleilu.com/070_Index_Mgmt/00_Intro.html 创建索引 PUT /new_index 创建更多详细设置的索引: 删除索引 DELT ...
- 升鲜宝V2.0_杭州生鲜配送行业,升鲜宝供应链B端订货系统使用说明_升鲜宝生鲜供应链管理系统_15382353715_余东升
升鲜宝V2.0_杭州生鲜配送行业,升鲜宝供应链B端订货系统使用说明_升鲜宝生鲜供应链管理系统_15382353715 升鲜宝生鲜配送供应链系统经过这些年的发展,形成一套独特的订 ...
- Python 基础语法-str
字符串常见操作 find:检测str是否包含在 mystr 中,如果是返回开始的索引值,否则返回 -1 mystr.index(str, start=0, end=len(mystr)) count: ...
- 【转载】【笔记】vue-router之路由传递参数
参考博客地址:https://blog.51cto.com/4547985/2390799 1.通过<router-link> 标签中的to传参 基本语法: <router-link ...
- NumPy 会自动检测并利用 GPU 吗?
PyTorch 官网 60 分钟入门教程在介绍什么是 PyTorch 时有一句话:A replacement for NumPy to use the power of GPUs PyTorch 是 ...