man-pages/man1/git-credential-cache.1.html
2021-03-31 01:06:50 +01:00

163 lines
3.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of GIT-CREDENTIAL-CAC</TITLE>
</HEAD><BODY>
<H1>GIT-CREDENTIAL-CAC</H1>
Section: Git Manual (1)<BR>Updated: 03/04/2021<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
git-credential-cache - Helper to temporarily store passwords in memory
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<PRE>
git config credential.helper 'cache [&lt;options&gt;]'
</PRE>
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
This command caches credentials in memory for use by future Git programs. The stored credentials never touch the disk, and are forgotten after a configurable timeout. The cache is accessible over a Unix domain socket, restricted to the current user by filesystem permissions.
<P>
You probably don't want to invoke this command directly; it is meant to be used as a credential helper by other parts of Git. See <B><A HREF="/cgi-bin/man/man2html?7+gitcredentials">gitcredentials</A></B>(7) or <B>EXAMPLES</B> below.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
--timeout &lt;seconds&gt;
<DL COMPACT><DT id="1"><DD>
Number of seconds to cache credentials (default: 900).
</DL>
<P>
--socket &lt;path&gt;
<DL COMPACT><DT id="2"><DD>
Use
<B>&lt;path&gt;</B>
to contact a running cache daemon (or start a new cache daemon if one is not started). Defaults to
<B>$XDG_CACHE_HOME/git/credential/socket</B>
unless
<B>~/.git-credential-cache/</B>
exists in which case
<B>~/.git-credential-cache/socket</B>
is used instead. If your home directory is on a network-mounted filesystem, you may need to change this to a local filesystem. You must specify an absolute path.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>CONTROLLING THE DAEMON</H2>
<P>
If you would like the daemon to exit early, forgetting all cached credentials before their timeout, you can issue an <B>exit</B> action:
<P>
<DL COMPACT><DT id="3"><DD>
<PRE>
git credential-cache exit
</PRE>
</DL>
<P>
<A NAME="lbAG">&nbsp;</A>
<H2>EXAMPLES</H2>
<P>
The point of this helper is to reduce the number of times you must type your username or password. For example:
<P>
<DL COMPACT><DT id="4"><DD>
<PRE>
$ git config credential.helper cache
$ git push <A HREF="http://example.com/repo.git">http://example.com/repo.git</A>
Username: &lt;type your username&gt;
Password: &lt;type your password&gt;
[work for 5 more minutes]
$ git push <A HREF="http://example.com/repo.git">http://example.com/repo.git</A>
[your credentials are used automatically]
</PRE>
</DL>
<P>
<P>
You can provide options via the credential.helper configuration variable (this example drops the cache time to 5 minutes):
<P>
<DL COMPACT><DT id="5"><DD>
<PRE>
$ git config credential.helper 'cache --timeout=300'
</PRE>
</DL>
<P>
<A NAME="lbAH">&nbsp;</A>
<H2>GIT</H2>
<P>
Part of the <B><A HREF="/cgi-bin/man/man2html?1+git">git</A></B>(1) suite
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="6"><A HREF="#lbAB">NAME</A><DD>
<DT id="7"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="8"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="9"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="10"><A HREF="#lbAF">CONTROLLING THE DAEMON</A><DD>
<DT id="11"><A HREF="#lbAG">EXAMPLES</A><DD>
<DT id="12"><A HREF="#lbAH">GIT</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:13 GMT, March 31, 2021
</BODY>
</HTML>