git/list[1] front-page[2] threads[3] people[4] search[5] about
 

BUG: Value for GIT_SSL_NO_VERIFY has no effect

From
BPBrijesh Patel <bridgepatel@gmail.com>
Date
Sep 15, 2022, 01:46 UTC
Message-ID
<CACs=J2MLnawNF5mp19sCJAZADPenHjWVZvKW5rM1fwELHjqqyg@mail.gmail.com>
Hi,

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.

Step 1: Clone the repo with default configuration.

git clone https://foo.com/bridgepate/gs_auto_provision.git Cloning into 'gs_auto_provision'... fatal: unable to access 'https://foo.com/bridgepate/gs_auto_provision.git/': SSL: certificate subject name (github.com) does not match target host name 'foo.com'

As expected, the above fails with SSL certificate error.
Step 2:  Clone with GIT_SSL_NO_VERIFY set to true

GIT_SSL_NO_VERIFY=true git clone https://foo.com/bridgepate/gs_auto_provision.git Cloning into 'gs_auto_provision'... warning: redirecting to https://github.com/bridgepate/gs_auto_provision.git/ remote: Enumerating objects: 244, done. remote: Counting objects: 100% (3/3), done. remote: Compressing objects: 100% (3/3), done. remote: Total 244 (delta 0), reused 1 (delta 0), pack-reused 241 Receiving objects: 100% (244/244), 108.75 KiB | 611.00 KiB/s, done. Resolving deltas: 100% (131/131), done.

The above works as expected.
Step 3:  Clone with GIT_SSL_NO_VERIFY to false

GIT_SSL_NO_VERIFY=false git clone https://foo.com/bridgepate/gs_auto_provision.git Cloning into 'gs_auto_provision'... warning: redirecting to https://github.com/bridgepate/gs_auto_provision.git/ remote: Enumerating objects: 244, done. remote: Counting objects: 100% (3/3), done. remote: Compressing objects: 100% (3/3), done. remote: Total 244 (delta 0), reused 1 (delta 0), pack-reused 241 Receiving objects: 100% (244/244), 108.75 KiB | 1.38 MiB/s, done. Resolving deltas: 100% (131/131), done.

We expect the above to fail as we saw in step 1, but it succeeded. This shows that the value for this environment variable is ignored.

Following is the platform details
OS: Ubuntu 22.04.1 LTS
GIT: git version 2.34.1
Thanks in advance
Brijesh Patel
Next: brian m. carlson
Message 1 of 19 in “BUG: Value for GIT_SSL_NO_VERIFY has no effect”
  1. Brijesh PatelSep 15, 2022
  2. brian m. carlsonSep 15, 2022
  3. Junio C HamanoSep 15, 2022
  4. 0/5 Update docs on GIT_* environment variablesJunio C Hamano, Sep 15, 2022
  5. 2/5 environ: explain Boolean environment variablesJunio C Hamano, Sep 15, 2022
  6. 5/5 environ: GIT_INDEX_VERSION affects not just a new repositoryJunio C Hamano, Sep 15, 2022
  7. 1/5 environ: document GIT_SSL_NO_VERIFYJunio C Hamano, Sep 15, 2022
  8. 3/5 environ: GIT_FLUSH should be made a usual BooleanJunio C Hamano, Sep 15, 2022
  9. René ScharfeJan 3, 2023
  10. Junio C HamanoJan 4, 2023
  11. René ScharfeJan 4, 2023
  12. Jeff KingJan 4, 2023
  13. René ScharfeJan 4, 2023
  14. Jeff KingJan 6, 2023
  15. 4/5 environ: simplify description of GIT_INDEX_FILEJunio C Hamano, Sep 15, 2022
  16. Todd ZullingerSep 16, 2022
  17. Junio C HamanoSep 16, 2022
  18. brian m. carlsonSep 15, 2022
  19. Junio C HamanoSep 15, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.