Update Git docs to 2.29.2
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-credential-cache.xml
blobfbbfd3e4817a00ce62fca3cec5f4be6758ec029f
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">\r
3 \r
4 <sect2 lang="en" id="git-credential-cache(1)">\r
5     <title>git-credential-cache(1)</title>\r
6 <indexterm>\r
7 <primary>git-credential-cache(1)</primary>\r
8 </indexterm>\r
9 <simplesect id="git-credential-cache(1)__name">\r
10 <title>NAME</title>\r
11 <simpara>git-credential-cache - Helper to temporarily store passwords in memory</simpara>\r
12 </simplesect>\r
13 <simplesect id="git-credential-cache(1)__synopsis">\r
14 <title>SYNOPSIS</title>\r
15 <screen>git config credential.helper 'cache [&lt;options&gt;]'</screen>\r
16 </simplesect>\r
17 <simplesect id="git-credential-cache(1)__description">\r
18 <title>DESCRIPTION</title>\r
19 <simpara>This command caches credentials in memory for use by future Git\r
20 programs. The stored credentials never touch the disk, and are forgotten\r
21 after a configurable timeout.  The cache is accessible over a Unix\r
22 domain socket, restricted to the current user by filesystem permissions.</simpara>\r
23 <simpara>You probably don't want to invoke this command directly; it is meant to\r
24 be used as a credential helper by other parts of Git. See\r
25 <xref linkend="gitcredentials(7)" /> or <emphasis>EXAMPLES</emphasis> below.</simpara>\r
26 </simplesect>\r
27 <simplesect id="git-credential-cache(1)__options">\r
28 <title>OPTIONS</title>\r
29 <variablelist>\r
30 <varlistentry>\r
31 <term>\r
32 --timeout &lt;seconds&gt;\r
33 </term>\r
34 <listitem>\r
35 <simpara>\r
36         Number of seconds to cache credentials (default: 900).\r
37 </simpara>\r
38 </listitem>\r
39 </varlistentry>\r
40 <varlistentry>\r
41 <term>\r
42 --socket &lt;path&gt;\r
43 </term>\r
44 <listitem>\r
45 <simpara>\r
46         Use <emphasis>&lt;path&gt;</emphasis> to contact a running cache daemon (or start a new\r
47         cache daemon if one is not started).\r
48         Defaults to <emphasis>$XDG_CACHE_HOME/git/credential/socket</emphasis> unless\r
49         <emphasis>~/.git-credential-cache/</emphasis> exists in which case\r
50         <emphasis>~/.git-credential-cache/socket</emphasis> is used instead.\r
51         If your home directory is on a network-mounted filesystem, you\r
52         may need to change this to a local filesystem. You must specify\r
53         an absolute path.\r
54 </simpara>\r
55 </listitem>\r
56 </varlistentry>\r
57 </variablelist>\r
58 </simplesect>\r
59 <simplesect id="git-credential-cache(1)__controlling_the_daemon">\r
60 <title>CONTROLLING THE DAEMON</title>\r
61 <simpara>If you would like the daemon to exit early, forgetting all cached\r
62 credentials before their timeout, you can issue an <emphasis>exit</emphasis> action:</simpara>\r
63 <screen>git credential-cache exit</screen>\r
64 </simplesect>\r
65 <simplesect id="git-credential-cache(1)__examples">\r
66 <title>EXAMPLES</title>\r
67 <simpara>The point of this helper is to reduce the number of times you must type\r
68 your username or password. For example:</simpara>\r
69 <screen>$ git config credential.helper cache\r
70 $ git push http://example.com/repo.git\r
71 Username: &lt;type your username&gt;\r
72 Password: &lt;type your password&gt;\r
74 [work for 5 more minutes]\r
75 $ git push http://example.com/repo.git\r
76 [your credentials are used automatically]</screen>\r
77 <simpara>You can provide options via the credential.helper configuration\r
78 variable (this example drops the cache time to 5 minutes):</simpara>\r
79 <screen>$ git config credential.helper 'cache --timeout=300'</screen>\r
80 </simplesect>\r
81 <simplesect id="git-credential-cache(1)__git">\r
82 <title>GIT</title>\r
83 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
84 </simplesect>\r
85 </sect2>\r