gpt4 book ai didi

Gradle : Unable to tunnel through proxy

转载 作者:IT王子 更新时间:2023-10-29 06:46:23 38 4
gpt4 key购买 nike

我正在尝试在需要基本身份验证和自签名 HTTPS 连接的企业代理后面运行一个空白的 Flutter 项目。

我在 ~/.gradle/gradle.properties~/.profile 中添加了必要的配置。我还在 $JAVA_HOME/jre/lib/security/cacerts 中导入了我的根证书,并告诉 Gradle 使用它。我什至试过this solution并在 $JAVA_HOME/jre/lib/net.properties 中设置 java.net.useSystemProxies=true

但是,它仍然没有构建,并且要求进行身份验证。

flutter run
Launching lib/main.dart on Nexus 5 in debug mode...
Initializing gradle... 0.8s
Resolving dependencies...
* Error running Gradle:
Exit code 1 from: ~/GitLab/n.gendron/techno_store/android/gradlew app:properties:
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
IOException: https://dl.google.com/android/repository/addons_list-3.xml
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
IOException: https://dl.google.com/android/repository/addons_list-2.xml
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
IOException: https://dl.google.com/android/repository/addons_list-1.xml
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
Failed to download any source lists!

This guide在这个过程中帮助了我很多,this one帮助我导入了 CA,但现在我卡住了。

有什么想法吗?

最佳答案

你需要在 gradle/gradle.properties 中写:

# Project-wide Gradle settings.
...

systemProp.http.proxyHost=proxy.company.com
systemProp.http.proxyPort=443
systemProp.http.proxyUser=username
systemProp.http.proxyPassword=password
systemProp.http.auth.ntlm.domain=domain

systemProp.https.proxyHost=proxy.company.com
systemProp.https.proxyPort=443
systemProp.https.proxyUser=username
systemProp.https.proxyPassword=password
systemProp.https.auth.ntlm.domain=domain

...

关于 Gradle : Unable to tunnel through proxy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49198617/

38 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com