git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Password for proxies from external

From
Jeff King <peff@peff.net>
Date
Nov 12, 2021, 21:28 UTC
Message-ID
<YY7cdTC2HWOoe56z@coredump.intra.peff.net>
In-Reply-To
<5743c211-bf8b-b485-3b81-a71b1b64bb4d@schuerz.at>
On Fri, Nov 12, 2021 at 02:07:03PM +0100, 6a50120e@schuerz.at wrote:
Show 11 quoted lines
> when i want to set a http-proxy for git, the configuration goes to
> ~/.gitconfig
> 
> ```
> [http]
>     proxy = http://username:password@proxy.dings.bums:1234
> 
> ```
> 
> So the proxy password is in cleartext written down to the config-file. The
> git own password-store can not be used... even no external like pass.
Have you tried including just the username, like:
  [http]
  proxy = http://username@example.com:1234

That should prompt for the password, including using your regular configured credential helpers; see 372370f167 (http: use credential API to handle proxy authentication, 2016-01-26).

We don't recognize HTTP 407 ("Proxy Authentication Required") to trigger the username/password lookup, like we do for an HTTP 401. That probably wouldn't be much code to add, but I suspect it's less important for a proxy versus a regular site because you only use one proxy (and it either needs auth or it doesn't).

-Peff
Previous: 6a50120e@schuerz.at
Message 2 of 2 in “Password for proxies from external”
  1. 6a50120e@schuerz.atNov 12, 2021
  2. Jeff KingNov 12, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.