From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org,
Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
Philippe Blain <levraiphilippeblain@gmail.com>
Subject: [PATCH 4/5] docs/git: discuss server-side config for GIT_PROTOCOL
Date: Fri, 10 Sep 2021 10:09:56 -0400 [thread overview]
Message-ID: <YTtnNLiKyZ3OkQqy@coredump.intra.peff.net> (raw)
In-Reply-To: <YTtleYs48A1NpUpp@coredump.intra.peff.net>
The v2 protocol requires that the GIT_PROTOCOL environment variable gets
passed around, but we don't have any documentation describing how this
is supposed to work. In particular, we need to note what server admins
might need to configure to make things work.
The definition of the GIT_PROTOCOL variable is probably the best place
for this, since:
- we deal with multiple transports (ssh, http, etc).
Transport-specific documentation (like the git-http-backend bits
added in the previous commit) are helpful for those transports, but
this gives a broader overview. Plus we do not have a specific
transport endpoint program for ssh, so this is a reasonable place to
mention it.
- the server side of the protocol involves multiple programs. For now,
upload-pack is the only endpoint which uses GIT_PROTOCOL, but that
will likely expand in the future. We're better off with a central
discussion of what the server admin might need to do. However, for
discoverability, this patch adds a pointer from upload-pack's
documentation.
Signed-off-by: Jeff King <peff@peff.net>
---
Documentation/git-upload-pack.txt | 8 ++++++++
Documentation/git.txt | 15 +++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/Documentation/git-upload-pack.txt b/Documentation/git-upload-pack.txt
index 9822c1eb1a..070fc78008 100644
--- a/Documentation/git-upload-pack.txt
+++ b/Documentation/git-upload-pack.txt
@@ -44,6 +44,14 @@ OPTIONS
<directory>::
The repository to sync from.
+ENVIRONMENT
+-----------
+
+`GIT_PROTOCOL`::
+ Internal variable used for handshaking the wire protocol. Server
+ admins may need to configure some transports to allow this
+ variable to be passed. See the discussion in linkgit:git[1].
+
SEE ALSO
--------
linkgit:gitnamespaces[7]
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 6dd241ef83..e4b82599fc 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -894,6 +894,21 @@ for full details.
Contains a colon ':' separated list of keys with optional values
'key[=value]'. Presence of unknown keys and values must be
ignored.
++
+Note that servers may need to be configured to allow this variable to
+pass over some transports. It will be propagated automatically when
+accessing local repositories (i.e., `file://` or a filesystem path), as
+well as over the `git://` protocol. For git-over-http, it should work
+automatically in most configurations, but see the discussion in
+linkgit:git-http-backend[1]. For git-over-ssh, the ssh server may need
+to be configured to allow clients to pass this variable (e.g., by using
+`AcceptEnv GIT_PROTOCOL` with OpenSSH).
++
+This configuration is optional. If the variable is not propagated, then
+clients will fall back to the original "v0" protocol (but may miss out
+on some performance improvements or features). This variable currently
+only affects clones and fetches; it is not yet used for pushes (but may
+be in the future).
`GIT_OPTIONAL_LOCKS`::
If set to `0`, Git will complete any requested operation without
--
2.33.0.731.g24eb83922d
next prev parent reply other threads:[~2021-09-10 14:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-04 15:17 [PATCH] Docs: web server must setenv GIT_PROTOCOL for v2 Konstantin Ryabitsev
2021-09-04 15:55 ` Jeff King
2021-09-07 20:57 ` Junio C Hamano
2021-09-07 21:11 ` Konstantin Ryabitsev
2021-09-08 10:48 ` Jeff King
2021-09-08 10:57 ` Jeff King
2021-09-08 16:50 ` Eric Wong
2021-09-09 17:28 ` Junio C Hamano
2021-09-09 17:35 ` Junio C Hamano
2021-09-10 11:39 ` Jeff King
2021-09-10 14:02 ` Jeff King
2021-09-10 14:04 ` [PATCH 1/5] t5551: test v2-to-v0 http protocol fallback Jeff King
2021-09-10 14:05 ` [PATCH 2/5] http-backend: handle HTTP_GIT_PROTOCOL CGI variable Jeff King
2021-09-10 14:09 ` [PATCH 3/5] docs/http-backend: mention v2 protocol Jeff King
2021-09-10 14:09 ` Jeff King [this message]
2021-09-10 14:10 ` [PATCH 5/5] docs/protocol-v2: point readers transport config discussion Jeff King
2021-09-10 22:08 ` [PATCH] Docs: web server must setenv GIT_PROTOCOL for v2 Junio C Hamano
2021-09-09 17:50 ` Philippe Blain
2021-09-10 5:39 ` Junio C Hamano
2021-09-10 11:40 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YTtnNLiKyZ3OkQqy@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=konstantin@linuxfoundation.org \
--cc=levraiphilippeblain@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).