私は、HTTPS URLから来ているプラグインをダウンロードするためにgradleを取得しようとしています。違う。私がインターネットで読んだことから、これは通常私が持っているプロキシを設定することで解決され、デバッグログのgradleからはそれを使用しているようです。また、デバッグログ内のすべてのURLに記載されている証明書を自分のcacertsファイルに手作業で追加してみました。GradleがHTTPSからプロキシ経由でプラグインをダウンロードできない
デバッグログ - springbootプラグイン用のGradleによって実行された最後のリダイレクトからは、 - 以下に示します。
Redirecting to 'https://jcenter.bintray.com/org/springframework/boot/spring-boot-tools/1.4.3.RELEASE/spring-boot-tools-1.4.3.RELEASE.pom' via {tls}->http://myProxy:2020->https://jcenter.bintray.com:443
can be kept alive indefinitely
Connection released: [id: 204][route: {tls}->http://myProxy:2020->https://plugins.gradle.org:443][total kept alive: 2; route allocated: 1 of 2; total allocated: 2 of 20]
CookieSpec selected: default
Auth cache not set in the context
Connection request: [route: {tls}->http://myProxy:2020->https://jcenter.bintray.com:443][total kept alive: 2; route allocated: 0 of 2; total allocated: 2 of 20]
Connection leased: [id: 206][route: {tls}->http://myProxy:2020->https://jcenter.bintray.com:443][total kept alive: 2; route allocated: 1 of 2; total allocated: 3 of 20]
Opening connection {tls}->http://myProxy:2020->https://jcenter.bintray.com:443
Connecting to myProxy/myProxyIp:2020
Connection established myIp:64916<->myProxyIp:2020
Tunnel to target created.
Enabled protocols: [TLSv1, TLSv1.1, TLSv1.2]
Enabled cipher suites:[Removed for readability]
Starting handshake
http-outgoing-206: Shutdown connection
Connection discarded
http-outgoing-206: Close connection
Connection released: [id: 206][route: {tls}->http://myProxy:2020->https://jcenter.bintray.com:443][total kept alive: 2; route allocated: 0 of 2; total allocated: 2 of 20]
Flushing resolved configuration data in Binary store in C:\Temp\gradle7433380394459999850.bin. Wrote root 2.
Timing: Running the build script took 1.082 secs
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'TutorialHelloWorld'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.4.3.RELEASE.
Required by:
project :
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.4.3.RELEASE.
> Could not parse POM https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-gradle-plugin/1.4.3.RELEASE/spring-boot-gradle-plugin-1.4.3.RELEASE.pom
> Could not resolve org.springframework.boot:spring-boot-tools:1.4.3.RELEASE.
> Could not resolve org.springframework.boot:spring-boot-tools:1.4.3.RELEASE.
> Could not get resource 'https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-tools/1.4.3.RELEASE/spring-boot-tools-1.4.3.RELEASE.pom'.
> Could not GET 'https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-tools/1.4.3.RELEASE/spring-boot-tools-1.4.3.RELEASE.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
* Try:
Run with --stacktrace option to get the stack trace.
BUILD FAILED
私はそれがOKでなければなりませんので、また、プロキシを使用している、私のブラウザを介して、このファイルをダウンロードすることができます。これは、Java 1.8.0_71-b15およびgradle 3.4です。
プロキシを持たないネットワーク上で同じマシンから同じコマンドを試してみましたが(そして、gradle用にプロキシが設定されていない)、同じエラーが発生しました。したがって、これはプロキシではなく私の環境です。
何が起こっている可能性がありますか?
'-Djavax.net.debug = all'をもう一度試して、証明書チェーンの状況を確認してください。明らかに、ブラウザが有効な証明書とみなすものとJDK8のトラストストアが一致しないものがあります。 –