From 054b0705117c147fe12da0511bdfb4bf73156ed4 Mon Sep 17 00:00:00 2001 From: Aleksandr Meshchriakov Date: Wed, 18 Feb 2026 16:25:00 +0100 Subject: [PATCH] =?UTF-8?q?CI:=20=D0=B6=D1=91=D1=81=D1=82=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=BF=D0=B8=D0=BD=D0=B8=D1=82=D1=8C=20git.dev=20=D0=BD=D0=B0?= =?UTF-8?q?=20=D0=B2=D0=BD=D1=83=D1=82=D1=80=D0=B5=D0=BD=D0=BD=D0=B8=D0=B9?= =?UTF-8?q?=20IP=20=D0=B8=20=D1=84=D0=BE=D1=80=D1=81=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D1=8C=20netdns=3Dgo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci-cd.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index 8f3a32f..9b1c7ac 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -179,6 +179,9 @@ jobs: # Ensure token endpoint host resolves to internal network IP from runner. # Registry auth flow may redirect to ${GITEA_HOST} even when pushing to REGISTRY_HOST. + # Replace old mapping if present and pin host to internal IP. + grep -v "[[:space:]]${GITEA_HOST}$" /etc/hosts > /tmp/hosts.cleaned || true + cat /tmp/hosts.cleaned > /etc/hosts echo "${REGISTRY_IP} ${GITEA_HOST}" >> /etc/hosts getent hosts "${GITEA_HOST}" || true @@ -187,6 +190,8 @@ jobs: unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY all_proxy ALL_PROXY export NO_PROXY="${NO_PROXY:-},${REGISTRY_IP},${GITEA_HOST}" export no_proxy="${no_proxy:-},${REGISTRY_IP},${GITEA_HOST}" + # Force pure Go resolver for crane to honor /etc/hosts mapping first. + export GODEBUG=netdns=go echo "${REGISTRY_PASSWORD}" | ./crane auth login --insecure "${REGISTRY_HOST}" -u "${REGISTRY_USER}" --password-stdin