fix(ci): use .netrc for HTTPS git auth instead of URL-embedded token
Some checks failed
Build and Push Docker Image / build (push) Failing after 9s

This commit is contained in:
2026-04-25 01:03:42 +00:00
parent 5a961a3f28
commit 9b453e5bb6

View File

@@ -8,8 +8,10 @@ WORKDIR /app
ARG GIT_TOKEN=""
RUN if [ -n "$GIT_TOKEN" ]; then \
git config --global url."https://b3nw:${GIT_TOKEN}@gitea.ext.ben.io/".insteadOf "ssh://gitea@git.local.ben.io/" && \
git config --global --add url."https://b3nw:${GIT_TOKEN}@gitea.ext.ben.io/".insteadOf "ssh://git.local.ben.io/"; \
git config --global url."https://gitea.ext.ben.io/".insteadOf "ssh://gitea@git.local.ben.io/" && \
git config --global --add url."https://gitea.ext.ben.io/".insteadOf "ssh://git.local.ben.io/" && \
echo "machine gitea.ext.ben.io login b3nw password ${GIT_TOKEN}" > /root/.netrc && \
chmod 600 /root/.netrc; \
fi
COPY pyproject.toml uv.lock ./