Update Q4 2016:
(See "Error when using Git credential helper with gnome-keyring
")
(See "How to sign out in Git Bash console in Windows?": That is Git for Windows using the latest Microsoft Git Credential Manager for Windows)
Reminder: libgnome-keyring
is specific to GNOME and is:
Original answer (2012)
Credential Helpers, for Windows, Mac and Unix platforms, have been introduced first in "git-credential-helper" repo, which now has been included in git distro:
This repository contains the set of Git credential helpers (gitcredentials
(7)) that are part of git
(or meant to be contributed in the future).
$ git clone git://github.com/pah/git-credential-helper.git
$ BACKEND=gnome-keyring # or any other backend
$ cd git-credential-helper/$BACKEND
$ make
$ cp git-credential-$BACKEND /path/to/git/crendential
When built, it would be installed in /path/to/git/credential
directory.
To use this backend, you can add it to your (global) Git configuration by setting
(here for Unix):
git config --global credential.helper /path/to/git/credential/gnome-keyring/git-credential-gnome-keyring
Note for Windows:
I suppose you could make a program running on Windows and calling a library like "pypi keyring 0.10".
But that is the back-end, and you don't use it directly from Git.
What you are using is a "credential helper" (which, in turn, will call any credential API it wants on Windows).
GitHub for Windows provides such a helper (as an executable called... github
), and can store your credentials for the duration of the Windows session.
Launch a shell from that "GitHub for Windows" windows, and you will see, typing "git config --system -l
":
C:\Users\VonC\Documents\GitHub\test [master +2 ~0 -0 !]> git config --system -l
credential.helper=!github --credentials
The credential.helper=!github --credentials
part will call the credential helper 'github
'.
$ git config [--global] credential.helper $BACKEND