Patrick Gaskin

Configuring git-credential-cache on Linux

git-credential-cache is a useful tool to remember your HTTP/HTTPS git credentials (though you really should be using SSH instead). It’s useful when using long passwords or access tokens. It stores them in memory for a specific amount of time.

Enabling it

$ git config --global credential.helper cache

Setting the timeout

# Set the time to remember your credentials for (in seconds). The command below sets it to 10 minutes.
$ git config --global credential.helper 'cache --timeout=600'

Disabling it

$ git config --global --unset credential.helper