Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle can't resolve dependencies through my http proxy

Tags:

gradle

when I try to run gradle dependencies on my computer I am getting a 407 status code "Proxy Authentication Required."

I created a gradle.properties file in my %GRADLE_HOME% directory. gradle.properties contains the following entries:

systemProp.proxySet='true'
systemProp.http.proxyHost=http-proxy.nwie.net
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=%myUserNameHere%
systemProp.http.proxyPassword=%myPasswordHere%

I can successfully get through my proxy for ruby gems by setting HTTP_PROXY to the following value: http://%myUserNameHere%:%myPasswordHere%@http-proxy.nwie.net:8080

I am using gradle-1.3, please let me know if there is something I am missing.

Thanks in advance!

UPDATE: I tried setting systemProp.http.proxyUser to a new value in domain/username format. Below are my current properties file contents:

systemProp.proxySet=true
systemProp.http.proxyHost=http-proxy.nwie.net
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=http-proxy.nwie.net/%USERNAME%
systemProp.http.proxyPassword=%PASSWORD%

I am currently getting the same error message I found initially.

like image 443
geography_guy Avatar asked Dec 11 '12 21:12

geography_guy


People also ask

Can't resolve all dependencies for configuration gradle?

This is because of slow internet connection or you haven't configure proxy settings correctly. Gradle needs to download some dependencies , if it cant access the repository it fires this error. All you have to do is check your internet connection and make sure gradle can access the maven repository. Save this answer.

How do I change the proxy settings in IntelliJ gradle?

Configure proxy settings directly from IntelliJ IDEA. Do the following: Open the Version Control | Subversion | Network page of the IDE settings Ctrl+Alt+S . Click the Edit Network Options button and specify the proxy settings in the Edit Subversion Options Related to Network Layers dialog that opens.


1 Answers

Some dependencies are fetched from servers that run over HTTPS so you need to specify values for https properties as well:

systemProp.https.proxyHost=http-proxy.nwie.net
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=http-proxy.nwie.net/%USERNAME%
systemProp.https.proxyPassword=%PASSWORD%
like image 198
Eliseo Ocampos Avatar answered Sep 25 '22 23:09

Eliseo Ocampos