From 1d06760aba0830e7041214d7d7663866c1ea8fcf Mon Sep 17 00:00:00 2001 From: Tracewebstudio Dev Date: Thu, 30 Apr 2026 21:23:07 +0200 Subject: [PATCH] fix(ci): use authenticated remote URL for gitea git ops --- .github/workflows/sync-to-gitea.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sync-to-gitea.yml b/.github/workflows/sync-to-gitea.yml index 52aedde..e3d0cba 100644 --- a/.github/workflows/sync-to-gitea.yml +++ b/.github/workflows/sync-to-gitea.yml @@ -41,15 +41,16 @@ jobs: fi TARGET="https://ci.nxtgauge.com/Admin/${REPO}.git" AUTH="$(printf '%s' "${GITEA_USER}:${GITEA_TOKEN}" | base64 | tr -d '\n')" + AUTH_URL="https://${GITEA_USER}:${GITEA_TOKEN}@ci.nxtgauge.com/Admin/${REPO}.git" echo "Using Gitea user: ${GITEA_USER}" echo "Sync target: Admin/${REPO}.git" curl -fsS -H "Authorization: Basic ${AUTH}" "${TARGET}/info/refs?service=git-receive-pack" >/dev/null - git -c http.extraheader="Authorization: Basic ${AUTH}" ls-remote "${TARGET}" >/dev/null + git ls-remote "${AUTH_URL}" >/dev/null git remote remove gitea 2>/dev/null || true - git remote add gitea "${TARGET}" + git remote add gitea "${AUTH_URL}" - git -c http.extraheader="Authorization: Basic ${AUTH}" push gitea "HEAD:${BRANCH}" --force - git -c http.extraheader="Authorization: Basic ${AUTH}" push gitea --tags --force + git push gitea "HEAD:${BRANCH}" --force + git push gitea --tags --force