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>
This commit is contained in:
Aurelien Bompard 2007-10-28 18:47:30 +01:00 committed by Junio C Hamano
parent d1a2057560
commit 1c1f79a1e4
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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"