Git 2.46-rc1
[git.git] / Documentation / config / http.txt
blob162b33fc52f9672cc14808c77e7e90e53c2da889
1 http.proxy::
2         Override the HTTP proxy, normally configured using the 'http_proxy',
3         'https_proxy', and 'all_proxy' environment variables (see `curl(1)`). In
4         addition to the syntax understood by curl, it is possible to specify a
5         proxy string with a user name but no password, in which case git will
6         attempt to acquire one in the same way it does for other credentials. See
7         linkgit:gitcredentials[7] for more information. The syntax thus is
8         '[protocol://][user[:password]@]proxyhost[:port]'. This can be overridden
9         on a per-remote basis; see remote.<name>.proxy
11 Any proxy, however configured, must be completely transparent and must not
12 modify, transform, or buffer the request or response in any way.  Proxies which
13 are not completely transparent are known to cause various forms of breakage
14 with Git.
16 http.proxyAuthMethod::
17         Set the method with which to authenticate against the HTTP proxy. This
18         only takes effect if the configured proxy string contains a user name part
19         (i.e. is of the form 'user@host' or 'user@host:port'). This can be
20         overridden on a per-remote basis; see `remote.<name>.proxyAuthMethod`.
21         Both can be overridden by the `GIT_HTTP_PROXY_AUTHMETHOD` environment
22         variable.  Possible values are:
25 * `anyauth` - Automatically pick a suitable authentication method. It is
26   assumed that the proxy answers an unauthenticated request with a 407
27   status code and one or more Proxy-authenticate headers with supported
28   authentication methods. This is the default.
29 * `basic` - HTTP Basic authentication
30 * `digest` - HTTP Digest authentication; this prevents the password from being
31   transmitted to the proxy in clear text
32 * `negotiate` - GSS-Negotiate authentication (compare the --negotiate option
33   of `curl(1)`)
34 * `ntlm` - NTLM authentication (compare the --ntlm option of `curl(1)`)
37 http.proxySSLCert::
38         The pathname of a file that stores a client certificate to use to authenticate
39         with an HTTPS proxy. Can be overridden by the `GIT_PROXY_SSL_CERT` environment
40         variable.
42 http.proxySSLKey::
43         The pathname of a file that stores a private key to use to authenticate with
44         an HTTPS proxy. Can be overridden by the `GIT_PROXY_SSL_KEY` environment
45         variable.
47 http.proxySSLCertPasswordProtected::
48         Enable Git's password prompt for the proxy SSL certificate.  Otherwise OpenSSL
49         will prompt the user, possibly many times, if the certificate or private key
50         is encrypted. Can be overridden by the `GIT_PROXY_SSL_CERT_PASSWORD_PROTECTED`
51         environment variable.
53 http.proxySSLCAInfo::
54         Pathname to the file containing the certificate bundle that should be used to
55         verify the proxy with when using an HTTPS proxy. Can be overridden by the
56         `GIT_PROXY_SSL_CAINFO` environment variable.
58 http.emptyAuth::
59         Attempt authentication without seeking a username or password.  This
60         can be used to attempt GSS-Negotiate authentication without specifying
61         a username in the URL, as libcurl normally requires a username for
62         authentication.
64 http.proactiveAuth::
65         Attempt authentication without first making an unauthenticated attempt and
66         receiving a 401 response. This can be used to ensure that all requests are
67         authenticated. If `http.emptyAuth` is set to true, this value has no effect.
69 If the credential helper used specifies an authentication scheme (i.e., via the
70 `authtype` field), that value will be used; if a username and password is
71 provided without a scheme, then Basic authentication is used.  The value of the
72 option determines the scheme requested from the helper. Possible values are:
75 * `basic` - Request Basic authentication from the helper.
76 * `auto` - Allow the helper to pick an appropriate scheme.
77 * `none` - Disable proactive authentication.
80 Note that TLS should always be used with this configuration, since otherwise it
81 is easy to accidentally expose plaintext credentials if Basic authentication
82 is selected.
84 http.delegation::
85         Control GSSAPI credential delegation. The delegation is disabled
86         by default in libcurl since version 7.21.7. Set parameter to tell
87         the server what it is allowed to delegate when it comes to user
88         credentials. Used with GSS/kerberos. Possible values are:
91 * `none` - Don't allow any delegation.
92 * `policy` - Delegates if and only if the OK-AS-DELEGATE flag is set in the
93   Kerberos service ticket, which is a matter of realm policy.
94 * `always` - Unconditionally allow the server to delegate.
98 http.extraHeader::
99         Pass an additional HTTP header when communicating with a server.  If
100         more than one such entry exists, all of them are added as extra
101         headers.  To allow overriding the settings inherited from the system
102         config, an empty value will reset the extra headers to the empty list.
104 http.cookieFile::
105         The pathname of a file containing previously stored cookie lines,
106         which should be used
107         in the Git http session, if they match the server. The file format
108         of the file to read cookies from should be plain HTTP headers or
109         the Netscape/Mozilla cookie file format (see `curl(1)`).
110         Set it to an empty string, to accept only new cookies from
111         the server and send them back in successive requests within same
112         connection.
113         NOTE that the file specified with http.cookieFile is used only as
114         input unless http.saveCookies is set.
116 http.saveCookies::
117         If set, store cookies received during requests to the file specified by
118         http.cookieFile. Has no effect if http.cookieFile is unset, or set to
119         an empty string.
121 http.version::
122         Use the specified HTTP protocol version when communicating with a server.
123         If you want to force the default. The available and default version depend
124         on libcurl. Currently the possible values of
125         this option are:
127         - HTTP/2
128         - HTTP/1.1
130 http.curloptResolve::
131         Hostname resolution information that will be used first by
132         libcurl when sending HTTP requests.  This information should
133         be in one of the following formats:
135         - [+]HOST:PORT:ADDRESS[,ADDRESS]
136         - -HOST:PORT
139 The first format redirects all requests to the given `HOST:PORT`
140 to the provided `ADDRESS`(s). The second format clears all
141 previous config values for that `HOST:PORT` combination.  To
142 allow easy overriding of all the settings inherited from the
143 system config, an empty value will reset all resolution
144 information to the empty list.
146 http.sslVersion::
147         The SSL version to use when negotiating an SSL connection, if you
148         want to force the default.  The available and default version
149         depend on whether libcurl was built against NSS or OpenSSL and the
150         particular configuration of the crypto library in use. Internally
151         this sets the 'CURLOPT_SSL_VERSION' option; see the libcurl
152         documentation for more details on the format of this option and
153         for the ssl version supported. Currently the possible values of
154         this option are:
156         - sslv2
157         - sslv3
158         - tlsv1
159         - tlsv1.0
160         - tlsv1.1
161         - tlsv1.2
162         - tlsv1.3
165 Can be overridden by the `GIT_SSL_VERSION` environment variable.
166 To force git to use libcurl's default ssl version and ignore any
167 explicit http.sslversion option, set `GIT_SSL_VERSION` to the
168 empty string.
170 http.sslCipherList::
171   A list of SSL ciphers to use when negotiating an SSL connection.
172   The available ciphers depend on whether libcurl was built against
173   NSS or OpenSSL and the particular configuration of the crypto
174   library in use.  Internally this sets the 'CURLOPT_SSL_CIPHER_LIST'
175   option; see the libcurl documentation for more details on the format
176   of this list.
178 Can be overridden by the `GIT_SSL_CIPHER_LIST` environment variable.
179 To force git to use libcurl's default cipher list and ignore any
180 explicit http.sslCipherList option, set `GIT_SSL_CIPHER_LIST` to the
181 empty string.
183 http.sslVerify::
184         Whether to verify the SSL certificate when fetching or pushing
185         over HTTPS. Defaults to true. Can be overridden by the
186         `GIT_SSL_NO_VERIFY` environment variable.
188 http.sslCert::
189         File containing the SSL certificate when fetching or pushing
190         over HTTPS. Can be overridden by the `GIT_SSL_CERT` environment
191         variable.
193 http.sslKey::
194         File containing the SSL private key when fetching or pushing
195         over HTTPS. Can be overridden by the `GIT_SSL_KEY` environment
196         variable.
198 http.sslCertPasswordProtected::
199         Enable Git's password prompt for the SSL certificate.  Otherwise
200         OpenSSL will prompt the user, possibly many times, if the
201         certificate or private key is encrypted.  Can be overridden by the
202         `GIT_SSL_CERT_PASSWORD_PROTECTED` environment variable.
204 http.sslCAInfo::
205         File containing the certificates to verify the peer with when
206         fetching or pushing over HTTPS. Can be overridden by the
207         `GIT_SSL_CAINFO` environment variable.
209 http.sslCAPath::
210         Path containing files with the CA certificates to verify the peer
211         with when fetching or pushing over HTTPS. Can be overridden
212         by the `GIT_SSL_CAPATH` environment variable.
214 http.sslBackend::
215         Name of the SSL backend to use (e.g. "openssl" or "schannel").
216         This option is ignored if cURL lacks support for choosing the SSL
217         backend at runtime.
219 http.schannelCheckRevoke::
220         Used to enforce or disable certificate revocation checks in cURL
221         when http.sslBackend is set to "schannel". Defaults to `true` if
222         unset. Only necessary to disable this if Git consistently errors
223         and the message is about checking the revocation status of a
224         certificate. This option is ignored if cURL lacks support for
225         setting the relevant SSL option at runtime.
227 http.schannelUseSSLCAInfo::
228         As of cURL v7.60.0, the Secure Channel backend can use the
229         certificate bundle provided via `http.sslCAInfo`, but that would
230         override the Windows Certificate Store. Since this is not desirable
231         by default, Git will tell cURL not to use that bundle by default
232         when the `schannel` backend was configured via `http.sslBackend`,
233         unless `http.schannelUseSSLCAInfo` overrides this behavior.
235 http.pinnedPubkey::
236         Public key of the https service. It may either be the filename of
237         a PEM or DER encoded public key file or a string starting with
238         'sha256//' followed by the base64 encoded sha256 hash of the
239         public key. See also libcurl 'CURLOPT_PINNEDPUBLICKEY'. git will
240         exit with an error if this option is set but not supported by
241         cURL.
243 http.sslTry::
244         Attempt to use AUTH SSL/TLS and encrypted data transfers
245         when connecting via regular FTP protocol. This might be needed
246         if the FTP server requires it for security reasons or you wish
247         to connect securely whenever remote FTP server supports it.
248         Default is false since it might trigger certificate verification
249         errors on misconfigured servers.
251 http.maxRequests::
252         How many HTTP requests to launch in parallel. Can be overridden
253         by the `GIT_HTTP_MAX_REQUESTS` environment variable. Default is 5.
255 http.minSessions::
256         The number of curl sessions (counted across slots) to be kept across
257         requests. They will not be ended with curl_easy_cleanup() until
258         http_cleanup() is invoked. If USE_CURL_MULTI is not defined, this
259         value will be capped at 1. Defaults to 1.
261 http.postBuffer::
262         Maximum size in bytes of the buffer used by smart HTTP
263         transports when POSTing data to the remote system.
264         For requests larger than this buffer size, HTTP/1.1 and
265         Transfer-Encoding: chunked is used to avoid creating a
266         massive pack file locally.  Default is 1 MiB, which is
267         sufficient for most requests.
269 Note that raising this limit is only effective for disabling chunked
270 transfer encoding and therefore should be used only where the remote
271 server or a proxy only supports HTTP/1.0 or is noncompliant with the
272 HTTP standard.  Raising this is not, in general, an effective solution
273 for most push problems, but can increase memory consumption
274 significantly since the entire buffer is allocated even for small
275 pushes.
277 http.lowSpeedLimit, http.lowSpeedTime::
278         If the HTTP transfer speed, in bytes per second, is less than
279         'http.lowSpeedLimit' for longer than 'http.lowSpeedTime' seconds,
280         the transfer is aborted.
281         Can be overridden by the `GIT_HTTP_LOW_SPEED_LIMIT` and
282         `GIT_HTTP_LOW_SPEED_TIME` environment variables.
284 http.noEPSV::
285         A boolean which disables using of EPSV ftp command by curl.
286         This can be helpful with some "poor" ftp servers which don't
287         support EPSV mode. Can be overridden by the `GIT_CURL_FTP_NO_EPSV`
288         environment variable. Default is false (curl will use EPSV).
290 http.userAgent::
291         The HTTP USER_AGENT string presented to an HTTP server.  The default
292         value represents the version of the Git client such as git/1.7.1.
293         This option allows you to override this value to a more common value
294         such as Mozilla/4.0.  This may be necessary, for instance, if
295         connecting through a firewall that restricts HTTP connections to a set
296         of common USER_AGENT strings (but not including those like git/1.7.1).
297         Can be overridden by the `GIT_HTTP_USER_AGENT` environment variable.
299 http.followRedirects::
300         Whether git should follow HTTP redirects. If set to `true`, git
301         will transparently follow any redirect issued by a server it
302         encounters. If set to `false`, git will treat all redirects as
303         errors. If set to `initial`, git will follow redirects only for
304         the initial request to a remote, but not for subsequent
305         follow-up HTTP requests. Since git uses the redirected URL as
306         the base for the follow-up requests, this is generally
307         sufficient. The default is `initial`.
309 http.<url>.*::
310         Any of the http.* options above can be applied selectively to some URLs.
311         For a config key to match a URL, each element of the config key is
312         compared to that of the URL, in the following order:
315 . Scheme (e.g., `https` in `https://example.com/`). This field
316   must match exactly between the config key and the URL.
318 . Host/domain name (e.g., `example.com` in `https://example.com/`).
319   This field must match between the config key and the URL. It is
320   possible to specify a `*` as part of the host name to match all subdomains
321   at this level. `https://*.example.com/` for example would match
322   `https://foo.example.com/`, but not `https://foo.bar.example.com/`.
324 . Port number (e.g., `8080` in `http://example.com:8080/`).
325   This field must match exactly between the config key and the URL.
326   Omitted port numbers are automatically converted to the correct
327   default for the scheme before matching.
329 . Path (e.g., `repo.git` in `https://example.com/repo.git`). The
330   path field of the config key must match the path field of the URL
331   either exactly or as a prefix of slash-delimited path elements.  This means
332   a config key with path `foo/` matches URL path `foo/bar`.  A prefix can only
333   match on a slash (`/`) boundary.  Longer matches take precedence (so a config
334   key with path `foo/bar` is a better match to URL path `foo/bar` than a config
335   key with just path `foo/`).
337 . User name (e.g., `user` in `https://user@example.com/repo.git`). If
338   the config key has a user name it must match the user name in the
339   URL exactly. If the config key does not have a user name, that
340   config key will match a URL with any user name (including none),
341   but at a lower precedence than a config key with a user name.
344 The list above is ordered by decreasing precedence; a URL that matches
345 a config key's path is preferred to one that matches its user name. For example,
346 if the URL is `https://user@example.com/foo/bar` a config key match of
347 `https://example.com/foo` will be preferred over a config key match of
348 `https://user@example.com`.
350 All URLs are normalized before attempting any matching (the password part,
351 if embedded in the URL, is always ignored for matching purposes) so that
352 equivalent URLs that are simply spelled differently will match properly.
353 Environment variable settings always override any matches.  The URLs that are
354 matched against are those given directly to Git commands.  This means any URLs
355 visited as a result of a redirection do not participate in matching.