happy-git-with-r
happy-git-with-r copied to clipboard
PAT storage on Linux
Chapter 9.5.3 gives the appearance that git cache or .Renviron
are the only PAT storage options on Linux. But there are two better options as can be seen in the documentation: the freedesktop.org Secret Service API and
GPG/pass compatible files.
On Gnome-based systems Gnome Keyring uses the freedesktop.org Secret Service API. A simple setup guide can be found here. The equivalent on KDE should be KWallet, as far as I am aware. I think you are not even limited to these options, for example you can also set up KeePassXC for secret service integration.
It would be nice to at least mention these options to prevent people from using the less secure .Renviron
option.
In addition there is https://github.com/hickford/git-credential-oauth, which even works in headless environments when the device flow is used.