chore(ci): log resolved gitea user and validate ls-remote
This commit is contained in:
parent
328ee8c6db
commit
096be08d63
1 changed files with 4 additions and 0 deletions
4
.github/workflows/sync-to-gitea.yml
vendored
4
.github/workflows/sync-to-gitea.yml
vendored
|
|
@ -42,7 +42,11 @@ jobs:
|
||||||
TARGET="https://ci.nxtgauge.com/Admin/${REPO}.git"
|
TARGET="https://ci.nxtgauge.com/Admin/${REPO}.git"
|
||||||
AUTH="$(printf '%s' "${GITEA_USER}:${GITEA_TOKEN}" | base64 | tr -d '\n')"
|
AUTH="$(printf '%s' "${GITEA_USER}:${GITEA_TOKEN}" | base64 | tr -d '\n')"
|
||||||
|
|
||||||
|
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
|
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 remote remove gitea 2>/dev/null || true
|
git remote remove gitea 2>/dev/null || true
|
||||||
git remote add gitea "${TARGET}"
|
git remote add gitea "${TARGET}"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue