Re: bearer token authorization with HTTPS transport
- From
Jeff King <peff@peff.net>
- Date
- Dec 31, 2014, 01:57 UTC
- Message-ID
- <20141231015738.GA9590@peff.net>
- In-Reply-To
- <20141231014209.GA8789@peff.net>
On Tue, Dec 30, 2014 at 08:42:09PM -0500, Jeff King wrote:
Show 15 quoted lines
> Both should be pretty trivial. This approach seems conceptually cleaner
> to me, though it does mean you could not specify a bearer via the
> terminal prompt for a password (e.g., by cutting and pasting from
> elsewhere). I don't know if that is a problem or not. You could override
> it with:
>
> [credential]
> helper = '!f() {
> test "$1" = "get" || return
> echo >/dev/tty "No, really, give me a bearer token: "
> read token </dev/tty
> echo "bearer=$token"
> }; f'
>
> or similar.And by the way, I'm not advocating that as something people would do on the fly. I mean only that it would be easy to write a drop-in helper to prompt people for a bearer token _before_ git makes it to the username/password prompt.
-Peff