Using GNOME Keyring for Git Credentials on Fedora 2523 November 2016 · Filed in Tutorial
In this post, I’m going to show you how to use the GNOME Keyring on Fedora 25 as a credential helper for Git. This post is very closely related to my earlier post on using GNOME Keyring as a Git credential helper on Ubuntu 16.04. As with the earlier Ubuntu-related post, what I’m including here isn’t new or ground-breaking information; I’m posting it primarily to make the information easier to find for others.
Like Ubuntu 16.04, Fedora 25 already has the basis for integrating GNOME Keyring into Git as a credential helper already installed into the
Unlike Ubuntu 16.04, though, Fedora already has a compiled credential helper installed. This Git credential helper is found at
/usr/libexec/git-core/git-credential-gnome-keyring. This credential helper is ready to use.
To get GNOME Keyring support for storing Git credentials, then, all one has to do is simply configure Git appropriately (no need to install additional packages or compile anything). You can configure Git via a couple of different ways:
You can use the
git configcommand, like this:
git config --global credential.helper /usr/libexec/git-core/git-credential-gnome-keyring
You can edit
~/.gitconfigdirectly, using the text editor of your choice. Add this text:
[credential] helper = /usr/libexec/git-core/git-credential-gnome-keyring
Once you add this directive to your Git configuration, then the next time you need to supply credentials, Git will store them in the GNOME Keyring automatically. You can verify this using Seahorse, the GUI front-end to the GNOME Keyring.Tags: CLI · Fedora · Git · Linux Previous Post: Using GNOME Keyring as Git Credential Helper Next Post: Installing Ansible 2.2 on Fedora 25