Gradle Distribution - Server redirected too many times (20) - Mac


(Jeremy Healy) #1

We are using a Authenticated Gradle distribution. Our Linux users are successfully pulling down the distribution via ./gradlew, while Mac users are experiencing a ProtocolException.

Here is our setup:

  1. We specify the distributionUrl in gradle-wrapper.properties.
    distributionUrl=https://{path to zip}

  2. We have systemProp.gradle.wrapperUser=username and systemProp.gradle.wrapperPassword=password defined in ~/.gradle/gradle.properties.

Running ./gradlew is successful on all of our Linux Machines.

Running ./gradlew on Mac machines gives us back:

Exception in thread “main” java.net.ProtocolException: Server redirected too many times (20)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1884)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at org.gradle.wrapper.Download.downloadInternal(Download.java:66)
at org.gradle.wrapper.Download.download(Download.java:51)
at org.gradle.wrapper.Install$1.call(Install.java:62)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

Has anyone else experienced this?


(Jeremy Healy) #2

Solved.

Basic Auth was failing due to a minor typo in systemProp user.