Skip to content

Commit ec8455e

Browse files
committed
Merge branch 'jk/url-insteadof-config'
The interaction of "url.*.insteadOf" and custom URL scheme's whitelisting is now documented better. * jk/url-insteadof-config: docs/config: mention protocol implications of url.insteadOf
2 parents 95173a5 + 2c9a2ae commit ec8455e

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Documentation/config.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3236,6 +3236,13 @@ url.<base>.insteadOf::
32363236
the best alternative for the particular user, even for a
32373237
never-before-seen repository on the site. When more than one
32383238
insteadOf strings match a given URL, the longest match is used.
3239+
+
3240+
Note that any protocol restrictions will be applied to the rewritten
3241+
URL. If the rewrite changes the URL to use a custom protocol or remote
3242+
helper, you may need to adjust the `protocol.*.allow` config to permit
3243+
the request. In particular, protocols you expect to use for submodules
3244+
must be set to `always` rather than the default of `user`. See the
3245+
description of `protocol.allow` above.
32393246

32403247
url.<base>.pushInsteadOf::
32413248
Any URL that starts with this value will not be pushed to;

contrib/persistent-https/README

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ to use persistent-https:
3535
[url "persistent-http"]
3636
insteadof = http
3737

38+
You may also want to allow the use of the persistent-https helper for
39+
submodule URLs (since any https URLs pointing to submodules will be
40+
rewritten, and Git's out-of-the-box defaults forbid submodules from
41+
using unknown remote helpers):
42+
43+
[protocol "persistent-https"]
44+
allow = always
45+
[protocol "persistent-http"]
46+
allow = always
47+
3848

3949
#####################################################################
4050
# BUILDING FROM SOURCE

0 commit comments

Comments
 (0)