1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
\r
4 <article lang="en" id="git-credential-cache(1)">
\r
6 <title>git-credential-cache(1)</title>
\r
8 <primary>git-credential-cache(1)</primary>
\r
11 <simplesect id="_name">
\r
13 <simpara>git-credential-cache - helper to temporarily store passwords in memory</simpara>
\r
15 <simplesect id="_synopsis">
\r
16 <title>SYNOPSIS</title>
\r
17 <screen>git config credential.helper 'cache [options]'</screen>
\r
19 <simplesect id="_description">
\r
20 <title>DESCRIPTION</title>
\r
21 <simpara>This command caches credentials in memory for use by future git
\r
22 programs. The stored credentials never touch the disk, and are forgotten
\r
23 after a configurable timeout. The cache is accessible over a Unix
\r
24 domain socket, restricted to the current user by filesystem permissions.</simpara>
\r
25 <simpara>You probably don't want to invoke this command directly; it is meant to
\r
26 be used as a credential helper by other parts of git. See
\r
27 <xref linkend="gitcredentials(7)" /> or <emphasis>EXAMPLES</emphasis> below.</simpara>
\r
29 <simplesect id="_options">
\r
30 <title>OPTIONS</title>
\r
34 --timeout <seconds>
\r
38 Number of seconds to cache credentials (default: 900).
\r
44 --socket <path>
\r
48 Use <emphasis><path></emphasis> to contact a running cache daemon (or start a new
\r
49 cache daemon if one is not started). Defaults to
\r
50 <emphasis>~/.git-credential-cache/socket</emphasis>. If your home directory is on a
\r
51 network-mounted filesystem, you may need to change this to a
\r
58 <simplesect id="_controlling_the_daemon">
\r
59 <title>CONTROLLING THE DAEMON</title>
\r
60 <simpara>If you would like the daemon to exit early, forgetting all cached
\r
61 credentials before their timeout, you can issue an <emphasis>exit</emphasis> action:</simpara>
\r
62 <screen>git credential-cache exit</screen>
\r
64 <simplesect id="_examples">
\r
65 <title>EXAMPLES</title>
\r
66 <simpara>The point of this helper is to reduce the number of times you must type
\r
67 your username or password. For example:</simpara>
\r
68 <screen>$ git config credential.helper cache
\r
69 $ git push http://example.com/repo.git
\r
70 Username: <type your username>
\r
71 Password: <type your password>
\r
73 [work for 5 more minutes]
\r
74 $ git push http://example.com/repo.git
\r
75 [your credentials are used automatically]</screen>
\r
76 <simpara>You can provide options via the credential.helper configuration
\r
77 variable (this example drops the cache time to 5 minutes):</simpara>
\r
78 <screen>$ git config credential.helper 'cache --timeout=300'</screen>
\r
80 <simplesect id="_git">
\r
82 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
\r