This is becoming even more important now with the new 2-factor authentication, as one has to create a new token each time a password is required on the terminal. Basically, I'm looking for an equvalent to the osxkeychain available in OS X that I could use on Linux desktops and servers:
git config --global credential.helper osxkeychain
I searched through the possible solutions, but so far I don't like any of them:
- ssh instead of https - not recommended and links not easily accessible on GitHub
cache --timeout=3600
- it will expire eventually and reentering the password is a drag with the new 2FA- gnome-keyring - doesn't work on a headless server (at least not too elegantly - the ssh passphrase keyring is much nicer)
- the encrypted .netrc file on my hard-drive method - poor man's manual keyring implementation?
Come on, there's got to be some proper terminal-based keychain for Linux that can be hooked to git's credential.helper!
git config --global credential.helper store
, although the password will be stored on your hard disk drive in an unecrypted way. – Incubus