From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: "Michal Suchánek" <msuchanek@suse.de>
Cc: git@vger.kernel.org
Subject: Re: Failing to push to a repository erases authentication helper credentials
Date: Mon, 30 Jun 2025 14:31:15 +0000 [thread overview]
Message-ID: <aGKfs5VRdmnw6Pqc@fruit.crustytoothpaste.net> (raw)
In-Reply-To: <aGKU-o9eXB1VHuN9@kitsune.suse.cz>
[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]
On 2025-06-30 at 13:45:30, Michal Suchánek wrote:
> I was trying out AGit https://docs.gitea.com/usage/agit with oauth
> helper https://github.com/hickford/git-credential-oauth encountering
> this bug https://github.com/go-gitea/gitea/issues/34583
>
> When doing so the oauth helper asked for new authentication, then for
> some reason I was asked for authentication by some other helper.
>
> After that pushing to repository to which I have permissions asked for
> authentication again.
>
> This hints that any failed git operation erases helper credentials.
This is true and it's by design.
> That does not sound like a desirable behavior.
It is in fact desirable because otherwise the user continues to attempt
to use the bad credentials and then can never again authenticate
successfully, since they are never again prompted for credentials.
> Could the previous credentials be preserved?
Git doesn't have a behaviour to do so, but you could of course craft a
custom credential helper that just rejects the erase command and passes
everything else through to another helper. That would achieve your
goal.
--
brian m. carlson (they/them)
Toronto, Ontario, CA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2025-06-30 14:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 13:45 Failing to push to a repository erases authentication helper credentials Michal Suchánek
2025-06-30 14:31 ` brian m. carlson [this message]
2025-06-30 15:09 ` Michal Suchánek
2025-06-30 18:29 ` brian m. carlson
2025-07-01 6:54 ` Michal Suchánek
2025-07-01 8:49 ` Michal Suchánek
2025-07-01 15:38 ` Junio C Hamano
2025-07-03 10:44 ` Michal Suchánek
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=aGKfs5VRdmnw6Pqc@fruit.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=msuchanek@suse.de \
/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).