2 .\" Title: git-credential-store
3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
7 .\" Source: Git 2.35.1.225.ge2ac9141e6
10 .TH "GIT\-CREDENTIAL\-STO" "1" "02/17/2022" "Git 2\&.35\&.1\&.225\&.ge2ac91" "Git Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 git-credential-store \- Helper to store credentials on disk
35 git config credential\&.helper \(aqstore [<options>]\(aq
44 .nr an-no-space-flag 1
52 Using this helper will store your passwords unencrypted on disk, protected only by filesystem permissions\&. If this is not an acceptable security tradeoff, try \fBgit-credential-cache\fR(1), or find a helper that integrates with secure storage provided by your operating system\&.
56 This command stores credentials indefinitely on disk for use by future Git programs\&.
58 You probably don\(cqt want to invoke this command directly; it is meant to be used as a credential helper by other parts of git\&. See \fBgitcredentials\fR(7) or \fBEXAMPLES\fR below\&.
65 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\&. If not specified, credentials will be searched for from
66 \fB~/\&.git\-credentials\fR
68 \fB$XDG_CONFIG_HOME/git/credentials\fR, and credentials will be written to
69 \fB~/\&.git\-credentials\fR
71 \fB$XDG_CONFIG_HOME/git/credentials\fR
72 if it exists and the former does not\&. See also
73 the section called \(lqFILES\(rq\&.
77 If not set explicitly with \fB\-\-file\fR, there are two files where git\-credential\-store will search for credentials in order of precedence:
81 User\-specific credentials file\&.
84 $XDG_CONFIG_HOME/git/credentials
86 Second user\-specific credentials file\&. If
87 \fI$XDG_CONFIG_HOME\fR
89 \fB$HOME/\&.config/git/credentials\fR
90 will be used\&. Any credentials stored in this file will not be used if
91 \fB~/\&.git\-credentials\fR
92 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\&.
95 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\&.
97 Credential storage will by default write to the first existing file in the list\&. If none of these files exist, \fB~/\&.git\-credentials\fR will be created and written to\&.
99 When erasing credentials, matching credentials will be erased from all files\&.
102 The point of this helper is to reduce the number of times you must type your username or password\&. For example:
108 $ git config credential\&.helper store
109 $ git push http://example\&.com/repo\&.git
110 Username: <type your username>
111 Password: <type your password>
114 $ git push http://example\&.com/repo\&.git
115 [your credentials are used automatically]
123 The \fB\&.git\-credentials\fR file is stored in plaintext\&. Each credential is stored on its own line as a URL like:
129 https://user:pass@example\&.com
136 No other kinds of lines (e\&.g\&. empty lines or comment lines) are allowed in the file, even though some may be silently ignored\&. Do not view or edit the file with editors\&.
138 When Git needs authentication for a particular URL context, credential\-store will consider that context a pattern to match against each entry in the credentials file\&. If the protocol, hostname, and username (if we already have one) match, then the password is returned to Git\&. See the discussion of configuration in \fBgitcredentials\fR(7) for more information\&.
141 Part of the \fBgit\fR(1) suite