Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/Documentation/git-credential-cache.adoc # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / Documentation / git-credential-cache.adoc` 101 lines ยท 3224 bytes Raw Blame History 1 git-credential-cache(1) 2 ======================= 3 4 NAME 5 ---- 6 git-credential-cache - Helper to temporarily store passwords in memory 7 8 SYNOPSIS 9 -------- 10 ----------------------------- 11 git config credential.helper 'cache []' 12 ----------------------------- 13 14 DESCRIPTION 15 ----------- 16 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. 24 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 <> below. 28 29 OPTIONS 30 ------- 31 32 --timeout :: 33 34 Number of seconds to cache credentials (default: 900). 35 36 --socket :: 37 38 Use `` 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. 46 47 CONTROLLING THE DAEMON 48 ---------------------- 49 50 If you would like the daemon to exit early, forgetting all cached 51 credentials before their timeout, you can issue an `exit` action: 52 53 -------------------------------------- 54 git credential-cache exit 55 -------------------------------------- 56 57 [[EXAMPLES]] 58 EXAMPLES 59 -------- 60 61 The point of this helper is to reduce the number of times you must type 62 your username or password. For example: 63 64 ------------------------------------ 65 $ git config credential.helper cache 66 $ git push http://example.com/repo.git 67 Username: 68 Password: 69 70 [work for 5 more minutes] 71 $ git push http://example.com/repo.git 72 [your credentials are used automatically] 73 ------------------------------------ 74 75 You can provide options via the credential.helper configuration 76 variable (this example increases the cache time to 1 hour): 77 78 ------------------------------------------------------- 79 $ git config credential.helper 'cache --timeout=3600' 80 ------------------------------------------------------- 81 82 PERSONAL ACCESS TOKENS 83 ---------------------- 84 85 Some remotes accept personal access tokens, which are randomly 86 generated and hard to memorise. They typically have a lifetime of weeks 87 or months. 88 89 git-credential-cache is inherently unsuitable for persistent storage of 90 personal access tokens. The credential will be forgotten after the cache 91 timeout. Even if you configure a long timeout, credentials will be 92 forgotten if the daemon dies. 93 94 To avoid frequently regenerating personal access tokens, configure a 95 credential helper with persistent storage. Alternatively, configure an 96 OAuth credential helper to generate credentials automatically. See 97 linkgit:gitcredentials[7], sections "Available helpers" and "OAuth". 98 99 GIT 100 --- 101 Part of the linkgit:git[1] suite