Beside the use of sudo, note that in 2016, libgnome-keyring
is specific to GNOME and is now deprecated (since January 2014, actually).
2022 option: git-credential-manager
Microsoft provides a cross-platform credential helper named GCM (Git Credential Manager), which you can install (no need to build it) and configure:
git-credential-manager-core configure
You will need Git 2.27+ to use it.
2016 option: git-credential-libsecret
Git 2.11+ (Q4 2016) included a new credential helper using libsecret
.
See commit 87d1353 (09 Oct 2016) by Mantas Mikulėnas (grawity
).
(Merged by Junio C Hamano — gitster
— in commit bfe800c, 26 Oct 2016)
A new credential helper that talks via “libsecret” with implementations of XDG Secret Service API has been added to
contrib/credential/
.it uses
libsecret
which can support other implementations of XDG Secret
Service API.
But in 2022, this is no longer needed. See above
As noted by mati865 in the comments:
It should be noted that some distros like Arch and Fedora provide helpers available as both binary and source.
- Libsecret binary on Arch:
/usr/lib/git-core/git-credential-libsecret
, and- Libsecret binary on Fedora:
/usr/libexec/git-core/git-credential-libsecret
.
Note: As @rugk adds in the comments, for Fedora and Git v2.25.2-1 or higher, you need to install an extra package with that binary, because it has been split from the main git package:
dnf install git-credential-libsecret