maven PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path


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


免責聲明!

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



猜您在找 報錯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:sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 大坑!maven的web項目初始化錯誤:sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification ... 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 異常解決:sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 解決 java 使用ssl過程中出現"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target" nginx中配置wss的websocket報錯:PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 解決mvn package遇到sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target報錯問題
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM