Android Studio 3.1:代理配置:无法为git操作设置https用户密码
我最近将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=
它为我工作了!!!!
it worked for me !!!!