LinuxCommandLibrary

git-credential-cache

Cache credentials in memory temporarily

TLDR

Cache credentials for 15 minutes

$ git config credential.helper cache
copy
Cache for specific duration
$ git config credential.helper 'cache --timeout=[3600]'
copy
Clear cached credentials
$ git credential-cache exit
copy

SYNOPSIS

git credential-cache [options]

DESCRIPTION

git credential-cache is a credential helper that temporarily stores authentication credentials in memory via a daemon process. It provides a balance between security and convenience by avoiding repeated password prompts without permanently storing credentials on disk.
When configured as a credential helper, it automatically captures credentials during the first authentication and reuses them for subsequent operations within the timeout period. The default timeout is 15 minutes (900 seconds), configurable with the --timeout option.
The daemon stores credentials in a Unix domain socket, accessible only to the current user. Credentials automatically expire after the timeout and are never written to disk, making this more secure than git-credential-store. The cache can be manually cleared with git credential-cache exit.

PARAMETERS

--timeout seconds

Cache timeout (default 900).
--socket path
Socket path.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community