Mirror registry behind a proxy

Posted on

I'm trying to mirror a registry for openshift installation behind an HTTP proxy, I have setup the http_proxy=http://server-ip:8080 and https_proxy=http://server-ip:8080 environment variables but once I try to run:

oc adm -a ${LOCAL_SECRET_JSON} release mirror --from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE} --to=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} --to-release-image=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}

I get "407 proxy authentication required"

I hope someone could assist me in fixing this issue. Thank you in advance!