Skip to content

Commit 7dab7c5

Browse files
committed
Merge branch 'jk/url-insteadof-config' into maint
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 f72e075 + 2c9a2ae commit 7dab7c5

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
@@ -3222,6 +3222,13 @@ url.<base>.insteadOf::
32223222
the best alternative for the particular user, even for a
32233223
never-before-seen repository on the site. When more than one
32243224
insteadOf strings match a given URL, the longest match is used.
3225+
+
3226+
Note that any protocol restrictions will be applied to the rewritten
3227+
URL. If the rewrite changes the URL to use a custom protocol or remote
3228+
helper, you may need to adjust the `protocol.*.allow` config to permit
3229+
the request. In particular, protocols you expect to use for submodules
3230+
must be set to `always` rather than the default of `user`. See the
3231+
description of `protocol.allow` above.
32253232

32263233
url.<base>.pushInsteadOf::
32273234
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)