mirror of https://github.com/samply/bridgehead.git
Comment out HTTP proxy parsing
This commit is contained in:
parent
9fc8564e4e
commit
e0990d99cb
|
@ -10,18 +10,21 @@ detectCompose() {
|
||||||
}
|
}
|
||||||
|
|
||||||
setupProxy() {
|
setupProxy() {
|
||||||
|
### Note: As the current data protection concepts do not allow communication via HTTP, this
|
||||||
|
### handling of a proxy for HTTP requests is commented out and will not be used
|
||||||
|
#
|
||||||
http="no"
|
http="no"
|
||||||
if [ $HTTP_PROXY_URL ]; then
|
# if [ $HTTP_PROXY_URL ]; then
|
||||||
if [[ ! -z "$HTTP_PROXY_USERNAME" && ! -z "$HTTP_PROXY_PASSWORD" ]]; then
|
# if [[ ! -z "$HTTP_PROXY_USERNAME" && ! -z "$HTTP_PROXY_PASSWORD" ]]; then
|
||||||
proto="$(echo $HTTP_PROXY_URL | grep :// | sed -e's,^\(.*://\).*,\1,g')"
|
# proto="$(echo $HTTP_PROXY_URL | grep :// | sed -e's,^\(.*://\).*,\1,g')"
|
||||||
fqdn="$(echo ${HTTP_PROXY_URL/$proto/})"
|
# fqdn="$(echo ${HTTP_PROXY_URL/$proto/})"
|
||||||
HTTP_PROXY_FULL_URL="$(echo $proto$HTTP_PROXY_USERNAME:$HTTP_PROXY_PASSWORD@$fqdn)"
|
# HTTP_PROXY_FULL_URL="$(echo $proto$HTTP_PROXY_USERNAME:$HTTP_PROXY_PASSWORD@$fqdn)"
|
||||||
http="authenticated"
|
# http="authenticated"
|
||||||
else
|
# else
|
||||||
HTTP_PROXY_FULL_URL=$HTTP_PROXY_URL
|
# HTTP_PROXY_FULL_URL=$HTTP_PROXY_URL
|
||||||
http="unauthenticated"
|
# http="unauthenticated"
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
https="no"
|
https="no"
|
||||||
if [ $HTTPS_PROXY_URL ]; then
|
if [ $HTTPS_PROXY_URL ]; then
|
||||||
|
|
|
@ -54,8 +54,8 @@ for DIR in /etc/bridgehead $(pwd); do
|
||||||
log "INFO" "Git is using no proxy!"
|
log "INFO" "Git is using no proxy!"
|
||||||
OUT=$(retry 5 git -C $DIR fetch 2>&1 && retry 5 git -C $DIR pull 2>&1)
|
OUT=$(retry 5 git -C $DIR fetch 2>&1 && retry 5 git -C $DIR pull 2>&1)
|
||||||
else
|
else
|
||||||
log "INFO" "Git is using proxy ${HTTP_PROXY_URL} from ${CONFFILE}"
|
log "INFO" "Git is using proxy ${HTTPS_PROXY_URL} from ${CONFFILE}"
|
||||||
OUT=$(retry 5 git -c http.proxy=$HTTP_PROXY_FULL_URL -c https.proxy=$HTTPS_PROXY_FULL_URL -C $DIR fetch 2>&1 && retry 5 git -c http.proxy=$HTTP_PROXY_FULL_URL -c https.proxy=$HTTPS_PROXY_FULL_URL -C $DIR pull 2>&1)
|
OUT=$(retry 5 git -c https.proxy=$HTTPS_PROXY_FULL_URL -C $DIR fetch 2>&1 && retry 5 git-c https.proxy=$HTTPS_PROXY_FULL_URL -C $DIR pull 2>&1)
|
||||||
fi
|
fi
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
report_error log "Unable to update git $DIR: $OUT"
|
report_error log "Unable to update git $DIR: $OUT"
|
||||||
|
|
Loading…
Reference in New Issue