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

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
    distributionUrl=https://{path to zip}

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

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

Running ./gradlew on Mac machines gives us back:

Exception in thread “main” Server redirected too many times (20)
at org.gradle.wrapper.Download.downloadInternal(
at org.gradle.wrapper.Install$
at org.gradle.wrapper.Install$
at org.gradle.wrapper.ExclusiveFileAccessManager.access(
at org.gradle.wrapper.Install.createDist(
at org.gradle.wrapper.WrapperExecutor.execute(
at org.gradle.wrapper.GradleWrapperMain.main(

Has anyone else experienced this?


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