Android Studio 3.1:代理配置:无法为git操作设置https用户密码 [英] Android Studio 3.1: Proxy configuration: Unable to set https user password for git operations
问题描述
我最近将我的 Android Studio 从 3.0 升级到了 3.1.在 3.0 中,我曾经在 gradle.properties(全局属性)文件中设置代理配置,其中包括设置 systemProp.https.proxyPassword 等.但是,我无法在 3.1 中设置此变量.防止在用户可访问的文件中写入用户密码似乎是一个设计决定.但是,如何设置相同?
I recently upgraded my Android Studio from 3.0 to 3.1. In 3.0, I used to set proxy configuration in gradle.properties(Global properties) file, which includes setting systemProp.https.proxyPassword among others. However, I am unable to set this variable in 3.1. It seems like a design decision to prevent writing user password in an user-accessible file. However, how to go about setting the same?
目前,每当我设置 systemProp.https.proxyPassword 时,下次打开 Android Studio 时它都会被空白字段覆盖.即使在 gradle.properties(具有全局范围)中再次设置此变量后,我也无法执行 git pull/push 操作.它返回以下错误:
Currently, whenever I set systemProp.https.proxyPassword, it gets overwritten with blank field next time I open Android Studio. And even after setting this variable again in gradle.properties (with global scope), I am unable to do git pull/push operations. It returns the following error:
更新取消
获取失败:无法访问 'https://github.com/user_name/repo_name.git/': CONNECT 后收到来自代理的 HTTP 代码 407
Update canceled
Fetch failed: unable to access 'https://github.com/user_name/repo_name.git/': Received HTTP code 407 from proxy after CONNECT
推荐答案
C:\Users\Admin.gradle\gradle.properties在记事本中打开此文件并更新密码都为
systemProp.http.proxyPassword=
systemProp.https.proxyPassword=
C:\Users\Admin.gradle\gradle.properties
open this file in your notepad and update your password
both for
systemProp.http.proxyPassword=
systemProp.https.proxyPassword=
它对我有用!!!!
这篇关于Android Studio 3.1:代理配置:无法为git操作设置https用户密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!