Storing Git HTTPS Authentication Credentials Locally

Pretty simple but I always forget this:

git config credential.helper store

This will store your git password unencrypted on the hard drive. You will need to enter it once more for this to kick in.

Alternatively you can store it in memory:

git config credential.helper cache

By default this will timeout after 900 seconds but you can add the --timeout parameter to alter that.

Even better, when using Ubuntu you can use libsecret to store the password securely with Gnome Keyring :

sudo apt-get install libsecret-1-0 libsecret-1-dev

sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret

git config --global credential.helper \


By Sam

Drupal developer from Perth, Western Australia. I love programming, gaming, the Internet, growing vegetables and hiking.

Leave a comment

Your email address will not be published. Required fields are marked *