Added SECURE_PROXY if the https and http proxy are the same

This commit is contained in:
Patrick Skowronek
2023-10-09 09:43:30 +02:00
parent 4bdad68da5
commit 85446b0a3e
4 changed files with 10 additions and 5 deletions

View File

@ -55,7 +55,7 @@ for DIR in /etc/bridgehead $(pwd); do
OUT=$(retry 5 git -C $DIR fetch 2>&1 && retry 5 git -C $DIR pull 2>&1)
else
log "INFO" "Git is using proxy ${HTTP_PROXY_URL} from ${CONFFILE}"
OUT=$(retry 5 git -c http.proxy=$PROXY -c https.proxy=$PROXY -C $DIR fetch 2>&1 && retry 5 git -c http.proxy=$PROXY -c https.proxy=$PROXY -C $DIR pull 2>&1)
OUT=$(retry 5 git -c http.proxy=$PROXY -c https.proxy=$SECURE_PROXY -C $DIR fetch 2>&1 && retry 5 git -c http.proxy=$PROXY -c https.proxy=$SECURE_PROXY -C $DIR pull 2>&1)
fi
if [ $? -ne 0 ]; then
report_error log "Unable to update git $DIR: $OUT"