This question is specifically about the Gradle wrapper and not a full Gradle installation.
My company forces me to use a proxy to access many urls, and all it usually takes to fix timeout problems is to configure whatever is trying to access said urls to use the proxy, after which I get a certificate verification error and I have to also add the sites' SSL certificates to Java's keystore (take this answer as an example for how to do the latter).
With the Gradle wrapper (version 7.4.1+), though, I'm still getting a timeout.
I searched, and I found many people appearing to have this problem. Most of them though, simply had to configure the proxy in the gradle.properties
file (on Windows it's by default in %userprofile%\.gradle
):
systemProp.http.proxyHost=the proxy host
systemProp.http.proxyPort=the port
systemProp.http.proxyUser=username (if authentication is needed)
systemProp.http.proxyPassword=password (if authentication is needed)
systemProp.https.proxyHost=the proxy host
systemProp.https.proxyPort=the port
systemProp.https.proxyUser=username (if authentication is needed)
systemProp.https.proxyPassword=password (if authentication is needed)
Or, they had to remove a wrong proxy configuration from the file.
A few of them solved the problem by increasing Gradle's timeouts with these properties:
systemProp.org.gradle.internal.http.connectionTimeout=300000
systemProp.org.gradle.internal.http.socketTimeout=300000
These solutions aren't working for me. Why?