Re: [PATCH] send-email: Defines smtpPassCmd config option
- From
Jeff King <peff@peff.net>
- Date
- May 4, 2020, 20:35 UTC
- Message-ID
- <20200504203556.GA28192@coredump.intra.peff.net>
- In-Reply-To
- <306703d7687377d6a74ec9f1d63331580a3c109b.camel@gmail.com>
On Mon, May 04, 2020 at 04:49:09PM -0300, Leonardo Bras wrote:
Show 21 quoted lines
> On Fri, 2020-05-01 at 23:59 +0000, brian m. carlson wrote:
> > git config credential.smtp://smtp.crustytoothpaste.net.helper \
> > '!f() { echo username=my-username; echo "password=$(my-password-command)"; }; f'
>
> I have tried doing this, with --global, and my config file changed like
> this:
>
> [credential "smtp://smtp.gmail.com"]
> helper = "!f() { echo username=mymail@gmail.com; echo
> \"password=$(gpg2 -q --for-your-eyes-only --no-tty -d ~/words/imap)\";
> }; f"
>
> While sendemail has:
> [sendemail]
> smtpServer = smtp.gmail.com
> smtpServerPort = 587
> smtpEncryption = tls
> smtpUser = mymail@gmail.com
>
> Yet still, I was asked for password:
> Password for 'smtp://mymail@gmail.com@smtp.gmail.com:587': I think the way the host-matching works, you'd need to put the ":587" into the credential.*.url config section heading for it to match.
-Peff