Junio C Hamano | 0df9271 | 2011-12-21 22:30:44 | [diff] [blame] | 1 | git-credential-cache(1) |
| 2 | ======================= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | d031611 | 2012-08-22 19:55:29 | [diff] [blame] | 6 | git-credential-cache - Helper to temporarily store passwords in memory |
Junio C Hamano | 0df9271 | 2011-12-21 22:30:44 | [diff] [blame] | 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| 10 | ----------------------------- |
Junio C Hamano | c9cb517 | 2018-06-01 07:13:44 | [diff] [blame] | 11 | git config credential.helper 'cache [<options>]' |
Junio C Hamano | 0df9271 | 2011-12-21 22:30:44 | [diff] [blame] | 12 | ----------------------------- |
| 13 | |
| 14 | DESCRIPTION |
| 15 | ----------- |
| 16 | |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 17 | This command caches credentials in memory for use by future Git |
Junio C Hamano | 0df9271 | 2011-12-21 22:30:44 | [diff] [blame] | 18 | programs. The stored credentials never touch the disk, and are forgotten |
| 19 | after a configurable timeout. The cache is accessible over a Unix |
| 20 | domain socket, restricted to the current user by filesystem permissions. |
| 21 | |
| 22 | You probably don't want to invoke this command directly; it is meant to |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 23 | be used as a credential helper by other parts of Git. See |
Junio C Hamano | 0df9271 | 2011-12-21 22:30:44 | [diff] [blame] | 24 | linkgit:gitcredentials[7] or `EXAMPLES` below. |
| 25 | |
| 26 | OPTIONS |
| 27 | ------- |
| 28 | |
| 29 | --timeout <seconds>:: |
| 30 | |
| 31 | Number of seconds to cache credentials (default: 900). |
| 32 | |
| 33 | --socket <path>:: |
| 34 | |
| 35 | Use `<path>` to contact a running cache daemon (or start a new |
Junio C Hamano | 7f4fdac | 2017-03-24 21:15:27 | [diff] [blame] | 36 | cache daemon if one is not started). |
| 37 | Defaults to `$XDG_CACHE_HOME/git/credential/socket` unless |
| 38 | `~/.git-credential-cache/` exists in which case |
| 39 | `~/.git-credential-cache/socket` is used instead. |
| 40 | If your home directory is on a network-mounted filesystem, you |
| 41 | may need to change this to a local filesystem. You must specify |
| 42 | an absolute path. |
Junio C Hamano | 0df9271 | 2011-12-21 22:30:44 | [diff] [blame] | 43 | |
| 44 | CONTROLLING THE DAEMON |
| 45 | ---------------------- |
| 46 | |
| 47 | If you would like the daemon to exit early, forgetting all cached |
| 48 | credentials before their timeout, you can issue an `exit` action: |
| 49 | |
| 50 | -------------------------------------- |
| 51 | git credential-cache exit |
| 52 | -------------------------------------- |
| 53 | |
| 54 | EXAMPLES |
| 55 | -------- |
| 56 | |
| 57 | The point of this helper is to reduce the number of times you must type |
| 58 | your username or password. For example: |
| 59 | |
| 60 | ------------------------------------ |
| 61 | $ git config credential.helper cache |
| 62 | $ git push http://example.com/repo.git |
| 63 | Username: <type your username> |
| 64 | Password: <type your password> |
| 65 | |
| 66 | [work for 5 more minutes] |
| 67 | $ git push http://example.com/repo.git |
| 68 | [your credentials are used automatically] |
| 69 | ------------------------------------ |
| 70 | |
| 71 | You can provide options via the credential.helper configuration |
| 72 | variable (this example drops the cache time to 5 minutes): |
| 73 | |
| 74 | ------------------------------------------------------- |
| 75 | $ git config credential.helper 'cache --timeout=300' |
| 76 | ------------------------------------------------------- |
| 77 | |
| 78 | GIT |
| 79 | --- |
| 80 | Part of the linkgit:git[1] suite |