Downloading https://services.gradle.org/distributions/gradle-2.12-bin.zip
Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
類似的問題,這樣的:gradlew.bat(和gradlew)出現SSLHandshakeException包裝上卻裝不上gradle這個
gradlew.bat (and gradlew) SSLHandShakeException
除了我只得到這個例外通過包裝執行的時候? (已安裝的本地gradle命令沒有任何問題。)我嘗試了所提出的解決方案,但無法使其正常工作。我甚至下載並從https://services.gradle.org/distributions/安裝證書中的cacerts
keytool -import -file "C:\tmp\gradlew.x509.base64.cer" -alias gradle -keystore "C:\Apps\java\jre\lib\security\cacerts"
我從包裝得到了命令:
java -Dorg.gradle.appname=gradlew -classpath "C:\mystuff\gradle-2.12\samples\java\multiproject\\gradle\wrapper\gradle-wrapper.jar" org.gradle.wrapper.GradleWrapperMain clean
我的猜測是,也許事情是錯誤的證書本身也許我現在用的是錯誤的編碼?
$ java -version
Picked up _JAVA_OPTIONS: -Xmx512M
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
複雜化這一點,我試着從gradle這個使用方法建議在這裏,這似乎已經奏效(根據輸出)
http://infposs.blogspot.ca/2013/06/installcert-and-java-7.html
但是,安裝證書,當我運行封裝,我仍然會得到相同的錯誤。