public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ashlesh Gawande <git@ashlesh•me>
To: "brian m. carlson" <sandals@crustytoothpaste•net>,
	git@vger•kernel.org, "Patrick Steinhardt" <ps@pks•im>,
	"Junio C Hamano" <gitster@pobox•com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail•com>,
	rsbecker@nexbridge•com
Subject: Re: [PATCH] http.c: prompt for username on 403
Date: Thu, 11 Dec 2025 11:35:11 +0530	[thread overview]
Message-ID: <888e3dec-e279-47af-8a91-04a06f6eb0af@ashlesh.me> (raw)
In-Reply-To: <aTn0BOM07Lyphq_1@fruit.crustytoothpaste.net>


On 12/11/25 03:58, brian m. carlson wrote:
> On 2025-12-10 at 12:30:27, Ashlesh Gawande wrote:
>> Oh, that http_code == 403 is my original proposal to prompt for
>> username/password on 403 (I did the diff on top of that instead of base).
>> But you pointed out that it would wipe out existing credentials. This is an
>> attempt to fix that by not prompting on 403 if git credentials are set.
>> So when credentials are provided through default netrc file (such that
>> http_auth.* are not set; git credential helper is not set) then we can still
>> get the prompt on 403.
> As Randall said, I don't think it's a good idea to do this.  It's a
> major change in how functionality works and it will probably break
> users.
>
> I did mention before that a better approach is to add a config to decide
> whether to honour the netrc and I think that would be the right choice
> here.  That lets people opt into different behaviour if they want it
> (and, to be honest, I _do_ very much want to skip netrc for Git
> credentials since I have similar problems as the ones you're describing)
> and avoids breaking things for existing users.

Hmm, okay I understand. Yes probably good idea to skip netrc for Git 
credentials.
Thank you for your input Brian and Randall!


  reply	other threads:[~2025-12-11  6:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 14:43 [PATCH] http.c: prompt for username on 403 Ashlesh Gawande
2025-10-14 21:29 ` brian m. carlson
2025-10-15 14:12   ` Ashlesh Gawande
2025-10-15 22:31     ` brian m. carlson
2025-12-09  8:22       ` Ashlesh Gawande
2025-12-10  2:05         ` brian m. carlson
2025-12-10 12:30           ` Ashlesh Gawande
2025-12-10 17:48             ` rsbecker
2025-12-10 22:28             ` brian m. carlson
2025-12-11  6:05               ` Ashlesh Gawande [this message]
2025-12-10 12:32           ` Ashlesh Gawande

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=888e3dec-e279-47af-8a91-04a06f6eb0af@ashlesh.me \
    --to=git@ashlesh$(echo .)me \
    --cc=avarab@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=ps@pks$(echo .)im \
    --cc=rsbecker@nexbridge$(echo .)com \
    --cc=sandals@crustytoothpaste$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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