Maven POM文件出現PKIX,sun.security.provider.certpath.SunCertPathBuilderException Maven model問題


1、idea創建spring boot時 maven出現問題及pom文件的翻譯如下

 

 

 

問題分為兩部分:1、是PKIX帶來的證書問題,2、是Maven模型問題

解決

第一個問題解決:

方法一:忽略SSL證書檢查:-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

 

 

 

方法二:添加安全證書

1、下載證書

打開訪問所缺失證書的對應網站,左上角鎖的位置(建議使用谷歌瀏覽器),下載安全證書,一直下一步,下載的證書可以自定義名稱,如我的是alibaba.cer

 

 

 

2、進入JDK里JRE的\lib\security目錄(%JRE_HOME%\lib\security目錄),進入命令模式--路徑輸入cmd。運行如下命令

 

keytool -import -alias <自定義別名> -keystore cacerts -file 剛剛下載的證書的絕對路徑及名稱

keytool -import -alias alibabaCer -keystore cacerts -file alibaba.cer  --因為我證書放在當前目錄下,所以可以不加路徑

執行命令時會需要輸入密碼,changeit。以及是否信任此證書,Y

若沒其他問題及解決當前問題

2、修改后POM文件還是提示相同問題,此時我們需要解決第二個問題。Maven模型問題

idea需要修改Maven使用的JDK,JDK為我們剛剛添加安全證書的JDK

 

 

 

問題百度的關鍵

maven FKIX sun.security.provider.certpath.SunCertPathBuilderException

 

參考資料:

https://www.cnblogs.com/wpbxin/p/11746229.html

https://blog.csdn.net/ljskr/article/details/84570573

其他解決方式:

https://blog.csdn.net/carrie__yang/article/details/79612385

https://www.iteye.com/blog/truth99-2160540

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 maven PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path 大坑!maven的web項目初始化錯誤:sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification ... Maven:sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 【問題記錄】Java服務發起HTTPS請求報錯:PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException 解決 java 使用ssl過程中出現"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target" 報錯PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target" 使用Maven時出現“jssecacerts PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilde”錯誤 PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target mvn 編譯報錯mavn sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targ
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM