Android Studio 3.1: Proxy configuration: Unable to set https user password for git operations


I recently upgraded my Android Studio from 3.0 to 3.1. In 3.0, I used to set proxy configuration in <em>gradle.properties</em>(Global properties) file, which includes setting <em>systemProp.https.proxyPassword</em> 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?

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 <em>gradle.properties</em> (with global scope), I am unable to do git pull/push operations. It returns the following error:


Update canceled<br /> Fetch failed: unable to access '<a href="https://github.com/user_name/repo_name.git/" rel="nofollow">https://github.com/user_name/repo_name.git/</a>': Received HTTP code 407 from proxy after CONNECT



One solution which worked for me is the following.

<ol><li><strong>Uncheck</strong> the box which says 'Require authentication' in the pop-up window which comes when you click on the proxy-error message. Note that the password section is 'N/A' in this pop-up message (i.e., there is option only to enter the username. It says you need to add the password in the gradle.properties file).</li> </ol>

<a href="https://i.stack.imgur.com/5HknY.png" rel="nofollow"><img alt="Pop up window where you have to uncheck the proxy authentication" class="b-lazy" data-src="https://i.stack.imgur.com/5HknY.png" data-original="https://i.stack.imgur.com/5HknY.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

<ol start="2"><li>

I set the following in gradle.properties (replace <em>xxxx</em> with your details)

systemProp.https.proxyPort=xxxx systemProp.https.proxyUser=xxxx systemProp.https.proxyHost=xxxx systemProp.https.proxyPassword=xxxx systemProp.http.proxyPort=xxxx systemProp.http.proxyUser=xxxx systemProp.http.proxyPassword=xxxx systemProp.http.proxyHost=xxxx </li> <li>

Go to File -> Settings -> Appearance & Behavior -> System Settings -> HTTP Proxy. Enter your proxy details (with username and password here)

</li> </ol>


  • Why do kprobes disable preemption and when is it safe to reenable it?
  • Can't switch branch: untracked working tree file because of case-insensitivity?
  • Apache shutting down unexpectedly
  • Browserify and Reactify source maps include full local path names
  • Does “internal” visibility modifier in Kotlin work yet?
  • Access the state of control in Winforms from another application
  • Mercurial: Identify file name after rename
  • Why does the following throw an “Object doesn't support property or method 'importNode
  • Changing media screen makes div overlay
  • Microsoft Excel Pivot miscalculation in Sum for positive and negative numbers
  • Merge Module leaving files during uninstall
  • Consuming a WCF service in a Java Client using wsHttpBinding
  • Why must we declare a variable name when adding a method to a struct in Golang?
  • Azure table store snapshot/backup capability
  • Bash if statement with multiple conditions
  • How to make JSON.NET deserialize to Microsoft Date Time?
  • How to get current document uri in XSLT?
  • Authentication in Play! and RestEasy
  • Tamper-proof configuration files in .NET?
  • SharedPreferences or SQLite Database?
  • Rails Find when some params will be blank
  • MongoError: Incorrect arguments
  • Django rest serializer Breaks when data exists
  • Retrieving value from sql ExecuteScalar()
  • How to redirect a user to a different server and include HTTP basic authentication credentials?
  • Does CUDA 5 support STL or THRUST inside the device code?
  • Can I make an Android app that runs a web view in Chrome 39?
  • KeystoneJS: Relationships in Admin UI not updating
  • Hits per day in Google Big Query
  • Can Visual Studio XAML designer handle font family names with spaces as a resource?
  • LevelDB C iterator
  • Linking SubReports Without LinkChild/LinkMaster
  • Authorize attributes not working in MVC 4
  • How can I remove ASP.NET Designer.cs files?
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]
  • Checking variable from a different class in C#
  • Busy indicator not showing up in wpf window [duplicate]
  • UserPrincipal.Current returns apppool on IIS
  • Python/Django TangoWithDjango Models and Databases
  • Net Present Value in Excel for Grouped Recurring CF