git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: 6a50120e@schuerz.at
Cc: git@vger.kernel.org
Subject: Re: Password for proxies from external
Date: Fri, 12 Nov 2021 16:28:21 -0500	[thread overview]
Message-ID: <YY7cdTC2HWOoe56z@coredump.intra.peff.net> (raw)
In-Reply-To: <5743c211-bf8b-b485-3b81-a71b1b64bb4d@schuerz.at>

On Fri, Nov 12, 2021 at 02:07:03PM +0100, 6a50120e@schuerz.at wrote:

> 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

      reply	other threads:[~2021-11-12 21:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12 13:07 Password for proxies from external 6a50120e
2021-11-12 21:28 ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YY7cdTC2HWOoe56z@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=6a50120e@schuerz.at \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).