git
[Ported from github.com/git/git] Sync with Git 2.56.1
Brought by drakestapleton
git / Documentation / config / transfer.adoc
| 1 | transfer.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 | + |
| 29 | Unknown values are treated as `full`, with a warning. |
| 30 | |
| 31 | transfer.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 | + |
| 39 | Note 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 | + |
| 43 | You might want to enable this to prevent inadvertent credentials |
| 44 | exposure, 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 | + |
| 58 | If such concerns don't apply to you then you probably don't need to be |
| 59 | concerned about credentials exposure due to storing sensitive |
| 60 | data 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 | |
| 69 | transfer.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 | + |
| 74 | When set, the fetch or receive will abort in the case of a malformed |
| 75 | object or a link to a nonexistent object. In addition, various other |
| 76 | issues are checked for, including legacy issues (see `fsck.<msg-id>`), |
| 77 | and potential security issues like the existence of a `.GIT` directory |
| 78 | or a malicious `.gitmodules` file (see the release notes for v2.2.1 |
| 79 | and v2.17.1 for details). Other sanity and security checks may be |
| 80 | added in future releases. |
| 81 | + |
| 82 | On the receiving side, failing fsckObjects will make those objects |
| 83 | unreachable, see "QUARANTINE ENVIRONMENT" in |
| 84 | linkgit:git-receive-pack[1]. On the fetch side, malformed objects will |
| 85 | instead be left unreferenced in the repository. |
| 86 | + |
| 87 | Due to the non-quarantine nature of the `fetch.fsckObjects` |
| 88 | implementation it cannot be relied upon to leave the object store |
| 89 | clean like `receive.fsckObjects` can. |
| 90 | + |
| 91 | As objects are unpacked they're written to the object store, so there |
| 92 | can be cases where malicious objects get introduced even though the |
| 93 | "fetch" failed, only to have a subsequent "fetch" succeed because only |
| 94 | new incoming objects are checked, not those that have already been |
| 95 | written to the object store. That difference in behavior should not be |
| 96 | relied upon. In the future, such objects may be quarantined for |
| 97 | "fetch" as well. |
| 98 | + |
| 99 | For now, the paranoid need to find some way to emulate the quarantine |
| 100 | environment if they'd like the same protection as "push". E.g. in the |
| 101 | case of an internal mirror do the mirroring in two steps, one to fetch |
| 102 | the untrusted objects, and then do a second "push" (which will use the |
| 103 | quarantine) to another internal repo, and have internal clients |
| 104 | consume this pushed-to repository, or embargo internal fetches and |
| 105 | only allow them once a full "fsck" has run (and no new fetches have |
| 106 | happened in the meantime). |
| 107 | |
| 108 | transfer.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 | + |
| 117 | You may also include a `!` in front of the ref name to negate the entry, |
| 118 | explicitly exposing it, even if an earlier entry marked it as hidden. |
| 119 | If you have multiple hideRefs values, later entries override earlier ones |
| 120 | (and entries in more-specific config files override less-specific ones). |
| 121 | + |
| 122 | If a namespace is in use, the namespace prefix is stripped from each |
| 123 | reference before it is matched against `transfer.hiderefs` patterns. In |
| 124 | order to match refs before stripping, add a `^` in front of the ref name. If |
| 125 | you combine `!` and `^`, `!` must be specified first. |
| 126 | + |
| 127 | For example, if `refs/heads/master` is specified in `transfer.hideRefs` and |
| 128 | the current namespace is `foo`, then `refs/namespaces/foo/refs/heads/master` |
| 129 | is 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 |
| 133 | ref is pointing to without mentioning its name (a so-called ".have" line). |
| 134 | + |
| 135 | Even if you hide refs, a client may still be able to steal the target |
| 136 | objects via the techniques described in the "SECURITY" section of the |
| 137 | linkgit:gitnamespaces[7] man page; it's best to keep private data in a |
| 138 | separate repository. |
| 139 | |
| 140 | transfer.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 | |
| 145 | transfer.advertiseSID:: |
| 146 | Boolean. When true, client and server processes will advertise their |
| 147 | unique session IDs to their remote counterpart. Defaults to false. |
| 148 | |
| 149 | transfer.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 | |
| 155 | transfer.advertiseObjectInfo:: |
| 156 | When `true`, the `object-info` capability is advertised by |
| 157 | servers. Defaults to false. |