Code

honor the http.sslVerify option in shell scripts
authorAurelien Bompard <aurelien@bompard.org>
Sun, 28 Oct 2007 17:47:30 +0000 (18:47 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 28 Oct 2007 21:16:59 +0000 (14:16 -0700)
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-clone.sh
git-ls-remote.sh

index 5e582fe247892fa7dffc44556c939863c36edc35..0ea3c24f59e32055e4d514e55fe3a6f6be095f9c 100755 (executable)
@@ -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
 
index d56cf92ebfa685fd724a47e1ca753f0735dbd5bd..fec70bbf88c614a2dadfc40950fdd7abdf7f2c63 100755 (executable)
@@ -54,9 +54,10 @@ tmpdir=$tmp-d
 
 case "$peek_repo" in
 http://* | https://* | ftp://* )
-        if [ -n "$GIT_SSL_NO_VERIFY" ]; then
-            curl_extra_args="-k"
-        fi
+       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 \
                "`git config --bool http.noEPSV`" = true ]; then
                curl_extra_args="${curl_extra_args} --disable-epsv"