2017-02-24 3 views
0

Ich habe versucht, Gradle zu bekommen, um ein Plugin herunterzuladen, das von einer HTTPS-URL kommt, und kann nicht für das Leben von mir herausfinden, was ich tue falsch. Von dem, was ich im Internet gelesen habe, wird dies normalerweise gelöst, indem man einen Proxy setzt - was ich habe, und von den Debug-Protokollen scheint es zu benutzen. Ich habe auch versucht, die Zertifikate, die für alle URLs im Debugprotokoll aufgeführt sind, manuell zu meiner Cacerts-Datei hinzuzufügen, ohne Erfolg.Gradle kann keine Plugins von HTTPS über Proxy herunterladen

Die Debug-Protokoll - - von der letzten Umleitung von gradle für das springboot Plugin ausgeführt wird unten dargestellt:

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 

ich diese Datei in meinem Browser herunterladen kann, die auch den Proxy verwendet, so dass in Ordnung sein sollte . Dies ist mit Java 1.8.0_71-b15 und 3.4.

Ich habe auch den gleichen Befehl von der gleichen Maschine in einem Netzwerk ohne Proxy (und kein Proxy für Gradle konfiguriert) und am Ende mit dem gleichen Fehler versucht, so scheint es, als wäre das etwas mit meiner Umgebung und nicht der Proxy .

Irgendwelche Ideen, was hier los sein könnte?

+1

versuchen Sie es erneut mit '-Djavax.net.debug = all ', damit Sie sehen können, was mit der Zertifikatskette passiert. Offensichtlich entspricht etwas nicht dem, was Ihr Browser als gültiges Zertifikat ansieht, und dem Truststore von JDK8. –

Antwort

0

Ich beendete den Neustart der Maschine nach meiner letzten Bearbeitung, und jetzt scheint der gradle build Befehl gut zu funktionieren; Ich bin mir nicht sicher, was der Neustart hätte geändert oder wenn es so bleiben würde, aber zumindest im Moment scheint es zu funktionieren.

Verwandte Themen