@@ -103,17 +103,20 @@ INPUT/OUTPUT FORMAT
103
103
`git credential` reads and/or writes (depending on the action used)
104
104
credential information in its standard input/output. This information
105
105
can correspond either to keys for which `git credential` will obtain
106
- the login/password information (e.g. host, protocol, path), or to the
107
- actual credential data to be obtained (login /password).
106
+ the login information (e.g. host, protocol, path), or to the actual
107
+ credential data to be obtained (username /password).
108
108
109
109
The credential is split into a set of named attributes, with one
110
- attribute per line. Each attribute is
111
- specified by a key-value pair, separated by an `=` (equals) sign,
112
- followed by a newline. The key may contain any bytes except `=`,
113
- newline, or NUL. The value may contain any bytes except newline or NUL.
110
+ attribute per line. Each attribute is specified by a key-value pair,
111
+ separated by an `=` (equals) sign, followed by a newline.
112
+
113
+ The key may contain any bytes except `=`, newline, or NUL. The value may
114
+ contain any bytes except newline or NUL.
115
+
114
116
In both cases, all bytes are treated as-is (i.e., there is no quoting,
115
117
and one cannot transmit a value with newline or NUL in it). The list of
116
118
attributes is terminated by a blank line or end-of-file.
119
+
117
120
Git understands the following attributes:
118
121
119
122
`protocol`::
@@ -123,7 +126,8 @@ Git understands the following attributes:
123
126
124
127
`host`::
125
128
126
- The remote hostname for a network credential.
129
+ The remote hostname for a network credential. This includes
130
+ the port number if one was specified (e.g., "example.com:8088").
127
131
128
132
`path`::
129
133
@@ -134,7 +138,7 @@ Git understands the following attributes:
134
138
`username`::
135
139
136
140
The credential's username, if we already have one (e.g., from a
137
- URL, from the user, or from a previously run helper).
141
+ URL, the configuration, the user, or from a previously run helper).
138
142
139
143
`password`::
140
144
@@ -146,8 +150,12 @@ Git understands the following attributes:
146
150
value is parsed as a URL and treated as if its constituent parts
147
151
were read (e.g., `url=https://example.com` would behave as if
148
152
`protocol=https` and `host=example.com` had been provided). This
149
- can help callers avoid parsing URLs themselves. Note that any
150
- components which are missing from the URL (e.g., there is no
151
- username in the example above) will be set to empty; if you want
152
- to provide a URL and override some attributes, provide the URL
153
- attribute first, followed by any overrides.
153
+ can help callers avoid parsing URLs themselves.
154
+
155
+ Note that specifying a protocol is mandatory and if the URL
156
+ doesn't specify a hostname (e.g., "cert:///path/to/file") the
157
+ credential will contain a hostname attribute whose value is an
158
+ empty string.
159
+
160
+ Components which are missing from the URL (e.g., there is no
161
+ username in the example above) will be left unset.
0 commit comments