diff options
author | Aurelien Bompard <aurelien@bompard.org> | 2007-10-28 18:47:30 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-10-28 14:16:59 -0700 |
commit | 1c1f79a1e44547d039e7bf94d9aaadd3fae007d1 (patch) | |
tree | 637d735124c264612ccbc18910948b6483536ed5 | |
parent | d1a2057560b33c926ba481618105edbb65d2c91c (diff) | |
download | git-1c1f79a1e44547d039e7bf94d9aaadd3fae007d1.tar.gz |
honor the http.sslVerify option in shell scripts
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | git-clone.sh | 3 | ||||
-rwxr-xr-x | git-ls-remote.sh | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/git-clone.sh b/git-clone.sh index 5e582fe247..0ea3c24f59 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 d56cf92ebf..fec70bbf88 100755 --- a/git-ls-remote.sh +++ b/git-ls-remote.sh @@ -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" |