git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Jeff KingNext: brian m. carlson
Message 4 of 6 in “bearer token authorization with HTTPS transport”
  1. David RenshawDec 30, 2014
  2. brian m. carlsonDec 30, 2014
  3. Jeff KingDec 31, 2014
  4. Jeff KingDec 31, 2014
  5. brian m. carlsonJan 6, 2015
  6. David RenshawJan 6, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.