Start the 2.46 cycle
[git.git] / Documentation / git-credential-cache.txt
blob487cc557a87feaa688d5e333dcecd2f83eb1ec48
1 git-credential-cache(1)
2 =======================
4 NAME
5 ----
6 git-credential-cache - Helper to temporarily store passwords in memory
8 SYNOPSIS
9 --------
10 -----------------------------
11 git config credential.helper 'cache [<options>]'
12 -----------------------------
14 DESCRIPTION
15 -----------
17 This command caches credentials for use by future Git programs.
18 The stored credentials are kept in memory of the cache-daemon
19 process (instead of being written to a file) and are forgotten after a
20 configurable timeout. Credentials are forgotten sooner if the
21 cache-daemon dies, for example if the system restarts. The cache
22 is accessible over a Unix domain socket, restricted to the current
23 user by filesystem permissions.
25 You probably don't want to invoke this command directly; it is meant to
26 be used as a credential helper by other parts of Git. See
27 linkgit:gitcredentials[7] or `EXAMPLES` below.
29 OPTIONS
30 -------
32 --timeout <seconds>::
34         Number of seconds to cache credentials (default: 900).
36 --socket <path>::
38         Use `<path>` to contact a running cache daemon (or start a new
39         cache daemon if one is not started).
40         Defaults to `$XDG_CACHE_HOME/git/credential/socket` unless
41         `~/.git-credential-cache/` exists in which case
42         `~/.git-credential-cache/socket` is used instead.
43         If your home directory is on a network-mounted filesystem, you
44         may need to change this to a local filesystem. You must specify
45         an absolute path.
47 CONTROLLING THE DAEMON
48 ----------------------
50 If you would like the daemon to exit early, forgetting all cached
51 credentials before their timeout, you can issue an `exit` action:
53 --------------------------------------
54 git credential-cache exit
55 --------------------------------------
57 EXAMPLES
58 --------
60 The point of this helper is to reduce the number of times you must type
61 your username or password. For example:
63 ------------------------------------
64 $ git config credential.helper cache
65 $ git push http://example.com/repo.git
66 Username: <type your username>
67 Password: <type your password>
69 [work for 5 more minutes]
70 $ git push http://example.com/repo.git
71 [your credentials are used automatically]
72 ------------------------------------
74 You can provide options via the credential.helper configuration
75 variable (this example increases the cache time to 1 hour):
77 -------------------------------------------------------
78 $ git config credential.helper 'cache --timeout=3600'
79 -------------------------------------------------------
81 GIT
82 ---
83 Part of the linkgit:git[1] suite