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

[PATCH] honor the http.sslVerify option in shell scripts

From
ABAurelien Bompard <aurelien@bompard.org>
Date
Oct 28, 2007, 17:47 UTC
Message-ID
<200710281847.30580.aurelien@bompard.org>
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
---
 git-clone.sh     |    3 ++-
 git-ls-remote.sh |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/git-clone.sh b/git-clone.sh
index 5e582fe..3bb683d 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -28,7 +28,8 @@ get_repo_base() {
        ) 2>/dev/null
 }

-if [ -n "$GIT_SSL_NO_VERIFY" ]; then
+if [ -n "$GIT_SSL_NO_VERIFY" -o \
+    "`git config --bool http.sslVerify`" = false ]; then
     curl_extra_args="-k"
 fi

diff --git a/git-ls-remote.sh b/git-ls-remote.sh
index d56cf92..3eb18d1 100755
--- a/git-ls-remote.sh
+++ b/git-ls-remote.sh
@@ -54,7 +54,8 @@ tmpdir=$tmp-d

 case "$peek_repo" in
 http://* | https://* | ftp://* )
-        if [ -n "$GIT_SSL_NO_VERIFY" ]; then
+        if [ -n "$GIT_SSL_NO_VERIFY" -o \
+            "`git config --bool http.sslVerify`" = false ]; then
             curl_extra_args="-k"
         fi
        if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
--
1.5.3.3
Message 1 of 1 in “honor the http.sslVerify option in shell scripts”
  1. honor the http.sslVerify option in shell scriptsAurelien Bompard, Oct 28, 2007

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.