summaryrefslogtreecommitdiffstats
path: root/git-credential-store.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-11 15:41:02 -0700
committerJunio C Hamano <gitster@pobox.com>2015-05-11 15:41:02 -0700
commit4cc4a84ff7c2cf78099e14d821eb027d5ba66d89 (patch)
tree8549c559df49ef0328eea3aa0d8b6b9b1a0a50a6 /git-credential-store.html
parentdd5004ad952f72405f1265393b3f95dbe212992a (diff)
downloadgit-htmldocs-4cc4a84ff7c2cf78099e14d821eb027d5ba66d89.tar.gz
Autogenerated HTML docs for v2.4.0-194-gc5180
Diffstat (limited to 'git-credential-store.html')
-rw-r--r--git-credential-store.html46
1 files changed, 43 insertions, 3 deletions
diff --git a/git-credential-store.html b/git-credential-store.html
index e87f9529e..eb63ef3ef 100644
--- a/git-credential-store.html
+++ b/git-credential-store.html
@@ -783,16 +783,56 @@ be used as a credential helper by other parts of git. See
</dt>
<dd>
<p>
- Use <code>&lt;path&gt;</code> to store credentials. The file will have its
+ Use <code>&lt;path&gt;</code> to lookup and store credentials. The file will have its
filesystem permissions set to prevent other users on the system
from reading it, but will not be encrypted or otherwise
- protected. Defaults to <code>~/.git-credentials</code>.
+ protected. If not specified, credentials will be searched for from
+ <code>~/.git-credentials</code> and <code>$XDG_CONFIG_HOME/git/credentials</code>, and
+ credentials will be written to <code>~/.git-credentials</code> if it exists, or
+ <code>$XDG_CONFIG_HOME/git/credentials</code> if it exists and the former does
+ not. See also <a href="#FILES">[FILES]</a>.
</p>
</dd>
</dl></div>
</div>
</div>
<div class="sect1">
+<h2 id="FILES">FILES</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>If not set explicitly with <em>--file</em>, there are two files where
+git-credential-store will search for credentials in order of precedence:</p></div>
+<div class="dlist"><dl>
+<dt class="hdlist1">
+~/.git-credentials
+</dt>
+<dd>
+<p>
+ User-specific credentials file.
+</p>
+</dd>
+<dt class="hdlist1">
+$XDG_CONFIG_HOME/git/credentials
+</dt>
+<dd>
+<p>
+ Second user-specific credentials file. If <em>$XDG_CONFIG_HOME</em> is not set
+ or empty, <code>$HOME/.config/git/credentials</code> will be used. Any credentials
+ stored in this file will not be used if <code>~/.git-credentials</code> has a
+ matching credential as well. It is a good idea not to create this file
+ if you sometimes use older versions of Git that do not support it.
+</p>
+</dd>
+</dl></div>
+<div class="paragraph"><p>For credential lookups, the files are read in the order given above, with the
+first matching credential found taking precedence over credentials found in
+files further down the list.</p></div>
+<div class="paragraph"><p>Credential storage will by default write to the first existing file in the
+list. If none of these files exist, <code>~/.git-credentials</code> will be created and
+written to.</p></div>
+<div class="paragraph"><p>When erasing credentials, matching credentials will be erased from all files.</p></div>
+</div>
+</div>
+<div class="sect1">
<h2 id="_examples">EXAMPLES</h2>
<div class="sectionbody">
<div class="paragraph"><p>The point of this helper is to reduce the number of times you must type
@@ -837,7 +877,7 @@ for more information.</p></div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2014-11-06 15:17:42 PST
+Last updated 2015-05-11 15:40:21 PDT
</div>
</div>
</body>