Skip to content

Commit 1c1f79a

Browse files
abompardgitster
authored andcommitted
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>
1 parent d1a2057 commit 1c1f79a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

git-clone.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ get_repo_base() {
2828
) 2>/dev/null
2929
}
3030

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

git-ls-remote.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ tmpdir=$tmp-d
5454

5555
case "$peek_repo" in
5656
http://* | https://* | ftp://* )
57-
if [ -n "$GIT_SSL_NO_VERIFY" ]; then
58-
curl_extra_args="-k"
59-
fi
57+
if [ -n "$GIT_SSL_NO_VERIFY" -o \
58+
"`git config --bool http.sslVerify`" = false ]; then
59+
curl_extra_args="-k"
60+
fi
6061
if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
6162
"`git config --bool http.noEPSV`" = true ]; then
6263
curl_extra_args="${curl_extra_args} --disable-epsv"

0 commit comments

Comments
 (0)