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

OAuth2 support in git?

From
Christian Halstrick <christian.halstrick@gmail.com>
Date
Jun 14, 2018, 08:09 UTC
Message-ID
<CAENte7iUYcLX1ym1rdiYT2L8yLSWforf8kUvfHKLvhi_GhKQvg@mail.gmail.com>

Can I use native git as client to contact a git server which does authentication with OAuth2 Client Credentials Grant [1]?

Background: We are running gerrit based git servers [2] in a cloud
environment. That environment supports OAuth2 authorization for the
apps running in the cloud. The idea is that clients (e.g. jenkins
jobs) talking git over http with such git servers should be able to
use OAuth2 tokens to authenticate clone/fetch requests. We would have
to adapt gerrit source code for token handling/validation but I am
asking here about the client side.

I know that other git server environments like github support that on client side by allowing tokens to be used as usernames in a BASIC authentication flow. We could do the same but I am asking whether there is also a way to transport tokens in a standard conform "Authorization: Bearer ..." Header field.

[1] https://tools.ietf.org/html/rfc6749#section-4.4 [2] https://www.gerritcodereview.com/

Next: brian m. carlson
Message 1 of 12 in “OAuth2 support in git?”
  1. Christian HalstrickJun 14, 2018
  2. brian m. carlsonJun 14, 2018
  3. Jeff KingJun 14, 2018
  4. Randall S. BeckerJun 14, 2018
  5. Jeff KingJun 14, 2018
  6. brian m. carlsonJun 14, 2018
  7. Johannes SchindelinJun 17, 2018
  8. Jeff KingJun 18, 2018
  9. Junio C HamanoJun 18, 2018
  10. Jeff KingJun 18, 2018
  11. Christian HalstrickJun 19, 2018
  12. Jeff KingJun 19, 2018

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.