sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target



  • 解决方法是往 JRE 中导入 Let's Encrypt 证书

    wget https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem
    
    keytool -trustcacerts -keystore "$JAVA_HOME/jre/lib/security/cacerts" -storepass changeit -noprompt -importcert -alias lets-encrypt-x3-cross-signed -file "lets-encrypt-x3-cross-signed.pem"
    

    显示

    证书已添加到密钥库中
    

登录后回复