title: Using Git on Windows, behind an HTTP proxy, without storing proxy password on disk
body: <p>I'm using Git on Windows, on a corporate network where I'm behind an HTTP proxy with Basic authentication. Outbound SSH doesn't work, so I have to use HTTPS through the proxy.</p>
  
  <p>I'm aware of how to use <code>git config http.proxy</code> to configure the settings as <code>http://[username]:[password]@[proxy]:[port]</code>.</p>
  
  <p>However, particularly as this is a shared machine, I'd rather not store my password in my <code>.gitconfig</code>. Additionally, changing my <code>.gitconfig</code> using the <code>git config</code> command leaves my password in my bash history, so even if I remember to clear my <code>.gitconfig</code> at the end of the session, I'll almost certainly forget to clear my history as well.</p>
  
  <p>I've tried setting <code>http.proxy</code> without a password, in the vain hope that I'd get a prompt asking me for my password when I try to push/pull, but I only get a 407 Proxy Authentication Required. All the information I've found online seems to either ignore the issues with having the password saved in plaintext in <code>.gitconfig</code>, or deals with NTLM proxies.</p>
  
  <p>I'm quite happy to type my proxy details every time I need to connect - the best solution I can see at the moment is writing a wrapper script that will prompt for my password and set that as an environment variable when calling <code>git</code> proper. Is this a decent solution, and are there any security implications to setting an environment variable for a single call in a script? Preferably, are there any built-in settings or existing tools that I can use for this?</p>