彻底解决unable to find valid certification path to requested target

 

下载证书

第一步是要下载证书

去你程序要访问的网站,点击那个锁按钮,并点击查看详情(chrome浏览器)

彻底解决unable to find valid certification path to requested target_第1张图片

点击View certificate

 

 

彻底解决unable to find valid certification path to requested target_第2张图片

 

点击详细信息

彻底解决unable to find valid certification path to requested target_第3张图片

 

复制到文件

下一步

彻底解决unable to find valid certification path to requested target_第4张图片

选择格式

彻底解决unable to find valid certification path to requested target_第5张图片

 

生成的名称,最后保存

彻底解决unable to find valid certification path to requested target_第6张图片

 

彻底解决unable to find valid certification path to requested target_第7张图片

 

彻底解决unable to find valid certification path to requested target_第8张图片

 

导入证书

切换到jre的/lib/security/下

è¿éåå¾çæè¿°

执行如下命令

keytool -import -alias abc -keystore cacerts -file D://abc.cer

 

库密钥口令输入:changeit

将会看到如下的信息

彻底解决unable to find valid certification path to requested target_第9张图片

 

是否信任:Y

彻底解决unable to find valid certification path to requested target_第10张图片

证书导入成功

查看证书,密钥仍然是changeit

keytool -list -keystore cacerts

彻底解决unable to find valid certification path to requested target_第11张图片\

 

至此证书导入成功。

重新运行程序,看还会不会报错

你可能感兴趣的:(Maven)