gradlew getting 403 on fetching gradle binary

Viewed 1595

I'm kind of stuck troubleshooting an issue.

  • During a Jenkins build I see the following error:

    Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: http://services.gradle.org/distributions/gradle-1.7-bin.zip

  • This also happens when I run ./gradlew clena build in my project in localhost (no VPN, etc)

  • It does NOT happen when I paste the binary URL into my browser (so that old gradle version does exist)

Binary referenced in gradel-wrapper.properties:

distributionUrl=http\://services.gradle.org/distributions/gradle-1.7-bin.zip

Any ideas?

1 Answers

Comments have pointed you to answer, but to clarify with more information and references.

Gradle announced on October 17, 2019, that starting on Janurary 2020, all Gradle services will no longer serve requests made with HTTP.

The URL you have specified for in gradle-wrapper.properties is for HTTP, switch to the HTTPS URL and it should work.

Reference: https://blog.gradle.org/decommissioning-http

Related