2 .\" Title: git-credential-store
3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
7 .\" Source: Git 2.46.0.551.gc5ee8f2d1c
10 .TH "GIT\-CREDENTIAL\-STORE" "1" "2024-09-10" "Git 2\&.46\&.0\&.551\&.gc5ee8f" "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
43 .nr an-no-space-flag 1
51 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\&.
55 This command stores credentials indefinitely on disk for use by future Git programs\&.
57 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\&.
64 to lookup and store credentials\&. The file will have its filesystem permissions set to prevent other users on the system from reading it, but it will not be encrypted or otherwise protected\&. If not specified, credentials will be searched for from
65 \fB~/\&.git\-credentials\fR
67 \fB$XDG_CONFIG_HOME/git/credentials\fR, and credentials will be written to
68 \fB~/\&.git\-credentials\fR
70 \fB$XDG_CONFIG_HOME/git/credentials\fR
71 if it exists and the former does not\&. See also
72 the section called \(lqFILES\(rq\&.
76 If not set explicitly with \fB\-\-file\fR, there are two files where git\-credential\-store will search for credentials in order of precedence:
80 User\-specific credentials file\&.
83 $XDG_CONFIG_HOME/git/credentials
85 Second user\-specific credentials file\&. If
86 \fI$XDG_CONFIG_HOME\fR
88 \fB$HOME/\&.config/git/credentials\fR
89 will be used\&. Any credentials stored in this file will not be used if
90 \fB~/\&.git\-credentials\fR
91 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\&.
94 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\&.
96 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\&.
98 When erasing credentials, matching credentials will be erased from all files\&.
101 The point of this helper is to reduce the number of times you must type your username or password\&. For example:
107 $ git config credential\&.helper store
108 $ git push http://example\&.com/repo\&.git
109 Username: <type your username>
110 Password: <type your password>
113 $ git push http://example\&.com/repo\&.git
114 [your credentials are used automatically]
121 The \fB\&.git\-credentials\fR file is stored in plaintext\&. Each credential is stored on its own line as a URL like:
127 https://user:pass@example\&.com
133 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\&.
135 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\&.
138 Part of the \fBgit\fR(1) suite