Re: [PATCH 3/3] clone: auto-enable git-credential-store when necessary
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- May 20, 2019, 15:17 UTC
- Message-ID
- <87h89pupdr.fsf@evledraar.gmail.com>
- In-Reply-To
- <20190520140825.GA31580@sigill.intra.peff.net>
On Mon, May 20 2019, Jeff King wrote:
Show 33 quoted lines
> On Mon, May 20, 2019 at 03:56:14PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> > -test_expect_failure 'fetch of password-URL clone uses stored auth' ' >> > +test_expect_success 'fetch of password-URL clone uses stored auth' ' >> > set_askpass wrong && >> > git -C clone-auth-none fetch && >> > expect_askpass none >> >> I've only looked at this very briefly, there's a regression here where >> you're assuming that having a configured credential helper means it >> works. >> >> I.e. I have a ~/.gitconfig where I point to some-gnome-thing-or-other >> what doesn't exist on my VPS in my ~/.gitconfig, cloning just warns >> about it being missing, but will store the password in the repo. >> >> With this you detect that I have the helper, don't store it, but then my >> helper doesn't work, whereas this worked before. > > There are more cases beyond that, too. You might have a helper defined > which doesn't actually store passwords, but just sometimes tries to > provide one. My thinking was that if you're clueful enough to have > configured helpers, you can probably deal with the fallout. But you're > right that it may still be a regression in the sense that the user may > still have to actually _do_ something to get their fetch to work. > > I guess a more robust version of this is that _after_ the successful > clone, we could ask the credential system "hey, do you have the > credential for $URL?". And if it can't answer, then we can take action > (whether that action is setting up credential-store and seeding it with > the password, or just advising the user about the situation). > > -Peff
Yeah I don't mean deal with some there-but-broken helper, but this:
/usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyring:
not foundUntil then the observable effect of that has been to make the credential.helper config a noop, but now it's causing "we have a helper" behavior.