Merge branch 'jk/transfer-limit-protocol' into maint-2.3
[gitweb.git] / Documentation / git.txt
index a62ed6f11abf973952cef795907c8f8488f12c69..b6a12b32ee5b7b01fc49ddda9f0ac280eaf0cac1 100644 (file)
@@ -1045,6 +1045,38 @@ GIT_ICASE_PATHSPECS::
        an operation has touched every ref (e.g., because you are
        cloning a repository to make a backup).
 
+`GIT_ALLOW_PROTOCOL`::
+       If set, provide a colon-separated list of protocols which are
+       allowed to be used with fetch/push/clone. This is useful to
+       restrict recursive submodule initialization from an untrusted
+       repository. Any protocol not mentioned will be disallowed (i.e.,
+       this is a whitelist, not a blacklist). If the variable is not
+       set at all, all protocols are enabled.  The protocol names
+       currently used by git are:
+
+         - `file`: any local file-based path (including `file://` URLs,
+           or local paths)
+
+         - `git`: the anonymous git protocol over a direct TCP
+           connection (or proxy, if configured)
+
+         - `ssh`: git over ssh (including `host:path` syntax,
+           `git+ssh://`, etc).
+
+         - `rsync`: git over rsync
+
+         - `http`: git over http, both "smart http" and "dumb http".
+           Note that this does _not_ include `https`; if you want both,
+           you should specify both as `http:https`.
+
+         - any external helpers are named by their protocol (e.g., use
+           `hg` to allow the `git-remote-hg` helper)
++
+Note that this controls only git's internal protocol selection.
+If libcurl is used (e.g., by the `http` transport), it may
+redirect to other protocols. There is not currently any way to
+restrict this.
+
 
 Discussion[[Discussion]]
 ------------------------