Gradle无法通过我的http代理解析依赖关系 [英] Gradle can't resolve dependencies through my http proxy
问题描述
当我尝试在我的计算机上运行 gradle dependencies
时,我得到了一个407状态代码需要代理身份验证。
我在%GRADLE_HOME%
目录中创建了一个gradle.properties文件。 gradle.properties
包含以下内容:
systemProp.proxySet =' true'
systemProp.http.proxyHost = http-proxy.nwie.net
systemProp.http.proxyPort = 8080
systemProp.http.proxyUser =%myUserNameHere%
systemProp.http .proxyPassword =%myPasswordHere%
我可以通过将HTTP_PROXY设置为以下值:
http://%myUserNameHere%:%myPasswordHere %@http-proxy.nwie.net:8080
我正在使用gradle-1.3,请让我知道是否有一些我错过了。
预先感谢!
更新:
我试着将systemProp.http.proxyUser设置为新的值域/用户名格式。以下是我当前的属性文件内容:
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%
我目前得到的是最初发现的错误消息。
systemProp.https.proxyHost = http-proxy.nwie.net
systemProp.https.proxyPort = 8080
systemProp.https.proxyUser = http-proxy.nwie .net /%USERNAME%
systemProp.https.proxyPassword =%PASSWORD%
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.
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%
这篇关于Gradle无法通过我的http代理解析依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!