git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: Brijesh Patel <bridgepatel@gmail.com>, git@vger.kernel.org
Subject: Re: BUG: Value for GIT_SSL_NO_VERIFY has no effect
Date: Thu, 15 Sep 2022 08:27:22 -0700	[thread overview]
Message-ID: <xmqq8rmkpsit.fsf@gitster.g> (raw)
In-Reply-To: <YyMi76Cy7KnfZFU4@tapette.crustytoothpaste.net> (brian m. carlson's message of "Thu, 15 Sep 2022 13:04:47 +0000")

"brian m. carlson" <sandals@crustytoothpaste.net> writes:

> On 2022-09-15 at 01:46:50, Brijesh Patel wrote:
>> Hi,
>
> Hey,
>
>> It appears that any value assigned to GIT_SSL_NO_VERIFY (true or
>> false) has no effect on the GIT operations. For testing purposes, we
>> have created a host entry for github.com and mapped it to foo.com.
>
> This is definitely true.  There are several Git environment variables
> that act this way, including GIT_CURL_VERBOSE, that check whether the
> environment is present or absent, not whether it's set to a particular
> value.
>
> I believe this behaviour is by design (although other folks are free to
> correct me if they think I'e wrong).

Yeah, a plausible alternative that could have existed is to name the
variable GIT_SSL_VERIFY with the boolean (or the usual Boolean +
'auto', even though I do not offhand think of what 'auto' should
do), but this variable definitely is designed to be "if set, the
feature named by the variable goes in effect, and you unset it to
make it ineffective".

I did a quick audit of the environment variables documented in
git(1) and it is a bit messy.  Many environment variables use
git_env_bool() to make themselves a proper Boolean environment
variable, but some others that are described to take "1" to "enable"
do not honor the usual "yes/true/on" convention.

SSL_NO_VERIFY is worse, as it is not even described.  So we should
add it to "git help git".

 Documentation/git.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git c/Documentation/git.txt i/Documentation/git.txt
index 0ef7f5e4ec..1b7e37e79a 100644
--- c/Documentation/git.txt
+++ i/Documentation/git.txt
@@ -682,6 +682,11 @@ for further details.
 	plink or tortoiseplink. This variable overrides the config setting
 	`ssh.variant` that serves the same purpose.
 
+`GIT_SSL_NO_VERIFY`::
+	Setting and exporting this environment variable to any value
+	tells Git not to verify the SSL certificate when fetching or
+	pushing over HTTPS.
+
 `GIT_ASKPASS`::
 	If this environment variable is set, then Git commands which need to
 	acquire passwords or passphrases (e.g. for HTTP or IMAP authentication)

  reply	other threads:[~2022-09-15 15:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15  1:46 BUG: Value for GIT_SSL_NO_VERIFY has no effect Brijesh Patel
2022-09-15 13:04 ` brian m. carlson
2022-09-15 15:27   ` Junio C Hamano [this message]
2022-09-15 16:06     ` [PATCH 0/5] Update docs on GIT_* environment variables Junio C Hamano
2022-09-15 16:06       ` [PATCH 1/5] environ: document GIT_SSL_NO_VERIFY Junio C Hamano
2022-09-15 16:06       ` [PATCH 2/5] environ: explain Boolean environment variables Junio C Hamano
2022-09-15 16:06       ` [PATCH 3/5] environ: GIT_FLUSH should be made a usual Boolean Junio C Hamano
2023-01-03 17:18         ` René Scharfe
2023-01-04  6:37           ` Junio C Hamano
2023-01-04 16:36             ` René Scharfe
2023-01-04  7:33           ` Jeff King
2023-01-04 16:36             ` René Scharfe
2023-01-06  9:10               ` Jeff King
2022-09-15 16:06       ` [PATCH 4/5] environ: simplify description of GIT_INDEX_FILE Junio C Hamano
2022-09-16 15:39         ` Todd Zullinger
2022-09-16 16:44           ` Junio C Hamano
2022-09-15 16:06       ` [PATCH 5/5] environ: GIT_INDEX_VERSION affects not just a new repository Junio C Hamano
2022-09-15 16:15     ` BUG: Value for GIT_SSL_NO_VERIFY has no effect brian m. carlson
2022-09-15 18:05       ` Junio C Hamano

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq8rmkpsit.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=bridgepatel@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    /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.
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 NNTP newsgroup(s).