How to use git with gnome-keyring integration

marcosdsanchez picture marcosdsanchez · Nov 14, 2012 · Viewed 68.8k times · Source

Git 1.8.0 supports integration with gnome-keyring.

http://www.h-online.com/open/news/item/Git-1-8-0-can-access-Windows-and-GNOME-keyrings-1733879.html

After reading the docs about the git credentials helpers: http://git-scm.com/docs/gitcredentials.html

I was not able to find a way to use this new feature. How can I integrate it? I'm using Archlinux with git installed from Archlinux's repository. (git 1.8.0)

Answer

James Ward picture James Ward · Jan 25, 2013

@marcosdsanchez's answer is for Arch (which answers the original question) but I'm on Ubuntu. For git >= 2.11:

sudo apt-get install libsecret-1-0 libsecret-1-dev
cd /usr/share/doc/git/contrib/credential/libsecret
sudo make
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret

For git < 2.11:

sudo apt-get install libgnome-keyring-dev
cd /usr/share/doc/git/contrib/credential/gnome-keyring
sudo make
git config --global credential.helper /usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyring