Re: Disabling credential helper?

2014-12-03 Thread Junio C Hamano
Jeff King p...@peff.net writes: Yeah, it's fine (as is GIT_ASKPASS=true). You could also provide a credential helper that gives you an empty username and password. But in both cases, I think that git will then feed the empty password to the server again, resulting in an extra useless

Re: Disabling credential helper?

2014-12-03 Thread brian m. carlson
On Tue, Dec 02, 2014 at 08:21:48PM -0500, Jeff King wrote: We could teach the credential-helper code to do that (e.g., a helper returns stop=true and we respect that). But I think you can do it reasonably well today by making the input process fail. Sadly setting GIT_ASKPASS to false just

Re: Disabling credential helper?

2014-12-03 Thread Jeff King
On Tue, Dec 02, 2014 at 08:36:07PM -0500, Jeff King wrote: But to answer your question: you can't currently. I would be happy to have a config syntax that means reset this multi-value config option list to nothing, but it does not yet exist. It would be useful for more than just

Re: Disabling credential helper?

2014-12-03 Thread Junio C Hamano
Jeff King p...@peff.net writes: 1. I chose the value-less boolean as a token to reset the list (since it is otherwise an unmeaningful error). The example above shows its use with -c, but you could also do: [credential] helper helper = foo in a config

Disabling credential helper?

2014-12-02 Thread brian m. carlson
At $DAYJOB, we have a Git server[0] that supports the smart HTTP protocol. That server can return a 401 if the repository is private or doesn't exist. We have several scripts, some of which run interactively, some not, that we simply want to fail if git fetch gets a non-2xx code. Unfortunately,

Re: Disabling credential helper?

2014-12-02 Thread Jonathan Nieder
(+peff) Hi, brian m. carlson wrote: We've used GIT_ASKPASS=/bin/echo, which seems to solve the problem, although it's ugly and I'm concerned it might break in the future. Is there a better way to do this? That's a good question. Before falling back to the askpass based prompt, Git tries

Re: Disabling credential helper?

2014-12-02 Thread Jeff King
On Tue, Dec 02, 2014 at 04:59:53PM -0800, Jonathan Nieder wrote: brian m. carlson wrote: We've used GIT_ASKPASS=/bin/echo, which seems to solve the problem, although it's ugly and I'm concerned it might break in the future. Is there a better way to do this? That's a good question.

Re: Disabling credential helper?

2014-12-02 Thread Jonathan Nieder
Jeff King wrote: On Tue, Dec 02, 2014 at 04:59:53PM -0800, Jonathan Nieder wrote: As long as you have no credential helpers configured, your GIT_ASKPASS based approach should work fine. Yeah, it's fine (as is GIT_ASKPASS=true). You could also provide a credential helper that gives you an

Re: Disabling credential helper?

2014-12-02 Thread Jeff King
On Tue, Dec 02, 2014 at 05:29:50PM -0800, Jonathan Nieder wrote: Jeff King wrote: On Tue, Dec 02, 2014 at 04:59:53PM -0800, Jonathan Nieder wrote: As long as you have no credential helpers configured, your GIT_ASKPASS based approach should work fine. Yeah, it's fine (as is