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
Some checks failed
Build and Push Docker Image / build (push) Failing after 9s
This commit is contained in:
@@ -8,8 +8,10 @@ WORKDIR /app
|
|||||||
|
|
||||||
ARG GIT_TOKEN=""
|
ARG GIT_TOKEN=""
|
||||||
RUN if [ -n "$GIT_TOKEN" ]; then \
|
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 url."https://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 --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
|
fi
|
||||||
|
|
||||||
COPY pyproject.toml uv.lock ./
|
COPY pyproject.toml uv.lock ./
|
||||||
|
|||||||
Reference in New Issue
Block a user