Re: [PATCH] send-email: Defines smtpPassCmd config option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-05-01 at 22:27:23, Taylor Blau wrote:
> On Fri, May 01, 2020 at 08:50:48AM -0700, Junio C Hamano wrote:
> > Documenting that "git send-email" can use "git credential" for its
> > password store, if it is not already documented, is of course a good
> > change.
> 
> I agree completely.

I also concur.

> > But I am not sure why this is "a good alternative".  Having more
> > choices that do not offer anything substantially different is a bad
> > thing.  Is this "new mechanism" better in what way?  Simpler to use?
> > Faster?  Less error prone?  Something else?
> 
> Ditto. I don't think that an increased surface-area of possibilities to
> specify your password to 'git send-email' is useful. Put another way:
> why *not* use the in-built credential helper, which is already
> supported?
> 
> Would having it documented eliminate some rationale for invoking a
> separate program?

I think perhaps many folks aren't aware that you can invoke Git with an
arbitrary shell command as "credential.helper", which of course makes
life a lot easier.  So if you want to invoke a separate command, it's
really as easy as this:

  git config credential.smtp://smtp.crustytoothpaste.net.helper \
    '!f() { echo username=my-username; echo "password=$(my-password-command)"; }; f'

So I think that documenting the use of the credential helper is step 1,
because probably most people _do_ want to use that for their passwords,
and then documenting that credential helpers can be arbitrary shell
commands that speak the protocol is step 2, so that people who don't can
figure out a way to do what they want.

I'll send some patches later which document the latter feature, since I
don't think we mention it anywhere outside of the FAQ.  I actually
didn't know about it until Peff mentioned it to me one time.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux