大家好!
我面临着在代理背后无法使用Gradle插件的问题。在.gradle/gradle.properties
中设置代理配置如下:
systemProp.proxySet=true
systemProp.http.keepAlive=true
systemProp.http.proxyHost=<proxyhost>
systemProp.http.proxyPort=<proxyport>
systemProp.http.proxyUser=<proxyuser>
systemProp.http.proxyPassword=<proxypassword>
systemProp.https.keepAlive=true
systemProp.https.proxyHost=<proxyhost>
systemProp.https.proxyPort=<proxyport>
systemProp.https.proxyUser=<proxyuser>
systemProp.https.proxyPassword=<proxypassword>
和gradle build
输出:
NEGOTIATE authentication error: No valid credentials provided (Mechanism level: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt))
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':<projectName>'.
> Could not resolve all files for configuration ':<projectName>:classpath'.
> Could not resolve net.ltgt.gradle:gradle-apt-plugin:0.15.
Required by:
project :<projectName>
> Could not resolve net.ltgt.gradle:gradle-apt-plugin:0.15.
> Could not get resource 'http://jcenter.bintray.com/net/ltgt/gradle/gradle-apt-plugin/0.15/gradle-apt-plugin-0.15.pom'.
> Could not GET 'http://jcenter.bintray.com/net/ltgt/gradle/gradle-apt-plugin/0.15/gradle-apt-plugin-0.15.pom'. Received status code 500 from server: Internal Server Error
每个存储库的..依此类推。看来我的代理通过使用错误的方案(kerberos而不是basic)拒绝了凭证属性。
我尝试指定systemProp.{protocol}.auth.preference=Basic
,但这无济于事。
build.gradle片段以及插件参考(在Gradle reference之后)
plugins {
id 'net.ltgt.apt-idea' version '0.15'
}
我对No valid credentials
消息感到有些惊讶。我的Maven setting.xml
使用相同的代理设置,因此能够构建Maven项目。
谢谢您的任何想法!
我也发现了类似的问题:
Gradle, not working behind proxy with NTLM on Windows
不幸的是,没有任何帮助。