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

git-credential-oauth

From
M Hickford <mirth.hickford@gmail.com>
Date
Nov 8, 2022, 11:12 UTC
Message-ID
<CAGJzqs=+fCQzkDX53H8Mz-DjXicVVgRmmzPjkatSiOpYO7wGGA@mail.gmail.com>

Hi all. I'm excited to share git-credential-oauth, a Git credential helper that securely authenticates to GitHub, GitLab, BitBucket and other forges using OAuth. https://github.com/hickford/git-credential-oauth

The target user currently uses personal access tokens with git-credential-store or git-credential-cache. I suspect most readers of this list use SSH keys to authenticate, but you're welcome to try it out with HTTPS remotes.

> The first time you push, the helper will open a browser window to authenticate. Subsequent pushes within the cache timeout require no interaction.

This read-only credential-generating helper is designed to be used in conjunction with existing storage helpers. It's neat how the credential system supports multiple helpers. With the config below, Git checks the cache for a stored credential before generating a fresh credential.

> [credential]
>   helper =
>   helper = cache --timeout 7200 # two hours
>   helper = oauth
Comments and suggestions welcome.

ps. Git Credential Manager already has this feature so why another helper? git-credential-oauth is a simpler app that just does OAuth. It's developed in Go so should be easy to package for Linux distros. The install size is smaller. For a full comparison, see https://github.com/hickford/git-credential-oauth#comparison-with-git-credential-manager .

Message 1 of 1 in “git-credential-oauth”
  1. M HickfordNov 8, 2022

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.