interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / Documentation / config / transfer.adoc

157 lines · 7441 bytes Raw Blame History
1transfer.connectivityCheck::
2 Choose which algorithm to use for the connectivity check
3 performed during object transfer operations such as
4 linkgit:git-fetch[1] and linkgit:git-receive-pack[1].
5 The connectivity check verifies that all objects reachable
6 from the incoming tips are available locally or, in a partial
7 clone, promised by a promisor remote.
8 The variants are as follows:
9+
10--
11`full` (default);;
12 Walk the full object closure of the boundary commits.
13`incremental`;;
14 Verify incoming commits by diffing their trees against parent
15 trees, recursively descending only into entries that differ.
16 The largest benefits occur when incoming commits change a
17 small fraction of a large tree closure, and it can be slower
18 than `full` when there are many incoming commits.
19 Falls back to `full` for clones, pushes into an empty
20 repository and deepening fetches.
21`auto`;;
22`auto=<cutoff>`;;
23 Choose between `full` and `incremental` with a heuristic.
24 Currently `incremental` is used when there are at most
25 _<cutoff>_ incoming commits (1000 by default), and `full`
26 otherwise. The heuristic may change in future versions.
27--
28+
29Unknown values are treated as `full`, with a warning.
30
31transfer.credentialsInUrl::
32 A configured URL can contain plaintext credentials in the form
33 `<protocol>://<user>:<password>@<domain>/<path>`. You may want
34 to warn or forbid the use of such configuration (in favor of
35 using linkgit:git-credential[1]). This will be used on
36 linkgit:git-clone[1], linkgit:git-fetch[1], linkgit:git-push[1],
37 and any other direct use of the configured URL.
38+
39Note that this is currently limited to detecting credentials in
40`remote.<name>.url` configuration; it won't detect credentials in
41`remote.<name>.pushurl` configuration.
42+
43You might want to enable this to prevent inadvertent credentials
44exposure, e.g. because:
45+
46* The OS or system where you're running git may not provide a way or
47 otherwise allow you to configure the permissions of the
48 configuration file where the username and/or password are stored.
49* Even if it does, having such data stored "at rest" might expose you
50 in other ways, e.g. a backup process might copy the data to another
51 system.
52* The git programs will pass the full URL to one another as arguments
53 on the command-line, meaning the credentials will be exposed to other
54 unprivileged users on systems that allow them to see the full
55 process list of other users. On linux the "hidepid" setting
56 documented in procfs(5) allows for configuring this behavior.
57+
58If such concerns don't apply to you then you probably don't need to be
59concerned about credentials exposure due to storing sensitive
60data in git's configuration files. If you do want to use this, set
61`transfer.credentialsInUrl` to one of these values:
62+
63* `allow` (default): Git will proceed with its activity without warning.
64* `warn`: Git will write a warning message to `stderr` when parsing a URL
65 with a plaintext credential.
66* `die`: Git will write a failure message to `stderr` when parsing a URL
67 with a plaintext credential.
68
69transfer.fsckObjects::
70 When `fetch.fsckObjects` or `receive.fsckObjects` are
71 not set, the value of this variable is used instead.
72 Defaults to false.
73+
74When set, the fetch or receive will abort in the case of a malformed
75object or a link to a nonexistent object. In addition, various other
76issues are checked for, including legacy issues (see `fsck.<msg-id>`),
77and potential security issues like the existence of a `.GIT` directory
78or a malicious `.gitmodules` file (see the release notes for v2.2.1
79and v2.17.1 for details). Other sanity and security checks may be
80added in future releases.
81+
82On the receiving side, failing fsckObjects will make those objects
83unreachable, see "QUARANTINE ENVIRONMENT" in
84linkgit:git-receive-pack[1]. On the fetch side, malformed objects will
85instead be left unreferenced in the repository.
86+
87Due to the non-quarantine nature of the `fetch.fsckObjects`
88implementation it cannot be relied upon to leave the object store
89clean like `receive.fsckObjects` can.
90+
91As objects are unpacked they're written to the object store, so there
92can be cases where malicious objects get introduced even though the
93"fetch" failed, only to have a subsequent "fetch" succeed because only
94new incoming objects are checked, not those that have already been
95written to the object store. That difference in behavior should not be
96relied upon. In the future, such objects may be quarantined for
97"fetch" as well.
98+
99For now, the paranoid need to find some way to emulate the quarantine
100environment if they'd like the same protection as "push". E.g. in the
101case of an internal mirror do the mirroring in two steps, one to fetch
102the untrusted objects, and then do a second "push" (which will use the
103quarantine) to another internal repo, and have internal clients
104consume this pushed-to repository, or embargo internal fetches and
105only allow them once a full "fsck" has run (and no new fetches have
106happened in the meantime).
107
108transfer.hideRefs::
109 String(s) `receive-pack` and `upload-pack` use to decide which
110 refs to omit from their initial advertisements. Use more than
111 one definition to specify multiple prefix strings. A ref that is
112 under the hierarchies listed in the value of this variable is
113 excluded, and is hidden when responding to `git push` or `git
114 fetch`. See `receive.hideRefs` and `uploadpack.hideRefs` for
115 program-specific versions of this config.
116+
117You may also include a `!` in front of the ref name to negate the entry,
118explicitly exposing it, even if an earlier entry marked it as hidden.
119If you have multiple hideRefs values, later entries override earlier ones
120(and entries in more-specific config files override less-specific ones).
121+
122If a namespace is in use, the namespace prefix is stripped from each
123reference before it is matched against `transfer.hiderefs` patterns. In
124order to match refs before stripping, add a `^` in front of the ref name. If
125you combine `!` and `^`, `!` must be specified first.
126+
127For example, if `refs/heads/master` is specified in `transfer.hideRefs` and
128the current namespace is `foo`, then `refs/namespaces/foo/refs/heads/master`
129is omitted from the advertisements. If `uploadpack.allowRefInWant` is set,
130`upload-pack` will treat `want-ref refs/heads/master` in a protocol v2
131`fetch` command as if `refs/namespaces/foo/refs/heads/master` did not exist.
132`receive-pack`, on the other hand, will still advertise the object id the
133ref is pointing to without mentioning its name (a so-called ".have" line).
134+
135Even if you hide refs, a client may still be able to steal the target
136objects via the techniques described in the "SECURITY" section of the
137linkgit:gitnamespaces[7] man page; it's best to keep private data in a
138separate repository.
139
140transfer.unpackLimit::
141 When `fetch.unpackLimit` or `receive.unpackLimit` are
142 not set, the value of this variable is used instead.
143 The default value is 100.
144
145transfer.advertiseSID::
146 Boolean. When true, client and server processes will advertise their
147 unique session IDs to their remote counterpart. Defaults to false.
148
149transfer.bundleURI::
150 When `true`, local `git clone` commands will request bundle
151 information from the remote server (if advertised) and download
152 bundles before continuing the clone through the Git protocol.
153 Defaults to `false`.
154
155transfer.advertiseObjectInfo::
156 When `true`, the `object-info` capability is advertised by
157 servers. Defaults to false.