aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2025-02-18 12:32:03 +0100
committerJunio C Hamano <gitster@pobox.com>2025-02-18 11:05:37 -0800
commit36463e32dfef16dc3a903763f14f5bbf6e0248e7 (patch)
tree65e053ffc7bc35376aeba7651c15f1f7d20fb6f1 /Documentation
parentd460267613da14eba959eb225e2cbf6a1e132eb1 (diff)
downloadgit-36463e32dfef16dc3a903763f14f5bbf6e0248e7.tar.xz
promisor-remote: check advertised name or URL
A previous commit introduced a "promisor.acceptFromServer" configuration variable with only "None" or "All" as valid values. Let's introduce "KnownName" and "KnownUrl" as valid values for this configuration option to give more choice to a client about which promisor remotes it might accept among those that the server advertised. In case of "KnownName", the client will accept promisor remotes which are already configured on the client and have the same name as those advertised by the client. This could be useful in a corporate setup where servers and clients are trusted to not switch names and URLs, but where some kind of control is still useful. In case of "KnownUrl", the client will accept promisor remotes which have both the same name and the same URL configured on the client as the name and URL advertised by the server. This is the most secure option, so it should be used if possible. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config/promisor.adoc22
1 files changed, 16 insertions, 6 deletions
diff --git a/Documentation/config/promisor.adoc b/Documentation/config/promisor.adoc
index 9cbfe3e59e..9192acfd24 100644
--- a/Documentation/config/promisor.adoc
+++ b/Documentation/config/promisor.adoc
@@ -12,9 +12,19 @@ promisor.advertise::
promisor.acceptFromServer::
If set to "all", a client will accept all the promisor remotes
a server might advertise using the "promisor-remote"
- capability. Default is "none", which means no promisor remote
- advertised by a server will be accepted. By accepting a
- promisor remote, the client agrees that the server might omit
- objects that are lazily fetchable from this promisor remote
- from its responses to "fetch" and "clone" requests from the
- client. See linkgit:gitprotocol-v2[5].
+ capability. If set to "knownName" the client will accept
+ promisor remotes which are already configured on the client
+ and have the same name as those advertised by the client. This
+ is not very secure, but could be used in a corporate setup
+ where servers and clients are trusted to not switch name and
+ URLs. If set to "knownUrl", the client will accept promisor
+ remotes which have both the same name and the same URL
+ configured on the client as the name and URL advertised by the
+ server. This is more secure than "all" or "knownName", so it
+ should be used if possible instead of those options. Default
+ is "none", which means no promisor remote advertised by a
+ server will be accepted. By accepting a promisor remote, the
+ client agrees that the server might omit objects that are
+ lazily fetchable from this promisor remote from its responses
+ to "fetch" and "clone" requests from the client. See
+ linkgit:gitprotocol-v2[5].