在创建新的 Spring Starter 项目时,我遇到了这个问题。
SunCertPathBuilderException:无法找到有效的证书路径 到请求的目标 - 创建新项目时出错
我在企业环境中使用应用程序,因此我认为这可能是其中的一些问题。但具体问题是什么,我不知道。
I have faced same issue in my company laptop
Try below steps to fix the issue:
First need to download the certificate of site the you are trying to hit. so for that:
Go to site -> Inspect -> security -> view certificate ->details->Export as Base64
OR
click on site icon left to address in address bar, select "Certificate" -> "Details" -> "Export" as Base64, single certificate".
Now need to add downloaded to your JVM. Determine location of cacerts files, eg. C:\Program Files (x86)\Java\jdk1.8.0_22\lib\security
open CMD to above path and give below command:
"keytool -import -trustcacerts -alias Filename -file FilePath -keystore cacerts"
Ex:
C:\Program Files\java\jdk1.8.0_22\lib\security>keytool -import -trustcacerts -alias certificate -file C:\Users\desktop\certificate.crt -keystore cacerts
Trust this certificate? [no]: y
Now Restart your Intellij and It works