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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Aurélien Bompard <aurelien@xxxxxxxxxxx>
---
 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux