From d5d4405ac2dc5b2ea919e58b3d10977f01131b39 Mon Sep 17 00:00:00 2001 From: Michael Chihlas Date: Fri, 29 May 2026 13:34:22 -0400 Subject: [PATCH] =?UTF-8?q?fix(ci):=20mirror=20=E2=80=94=20push=20refs/hea?= =?UTF-8?q?ds=20+=20refs/tags,=20not=20all=20refs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `git push --mirror` pushes everything under refs/* including refs/pull/*, which GitHub rejects with "deny updating a hidden ref" — GitHub manages its own refs/pull/N/head namespace and won't let outside pushers touch it. Switching to `--all --prune --force` + `--tags --prune --force` scopes the push to refs/heads/* and refs/tags/* only (same as the original lines) while keeping --prune so branch/tag deletions still propagate. Co-Authored-By: Claude Opus 4.7 --- .gitea/workflows/mirror-to-github.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/mirror-to-github.yml b/.gitea/workflows/mirror-to-github.yml index 1c355a7a..d539080f 100644 --- a/.gitea/workflows/mirror-to-github.yml +++ b/.gitea/workflows/mirror-to-github.yml @@ -15,4 +15,8 @@ jobs: git clone --mirror https://gitea.resolutionflow.com/chihlasm/resolutionflow.git repo cd repo git remote add github https://x-access-token:${{ secrets.GH_MIRROR_TOKEN }}@github.com/${{ secrets.GH_MIRROR_REPO }} - git push github --mirror \ No newline at end of file + # --all + --tags scopes the push to refs/heads/* and refs/tags/*, + # avoiding refs/pull/* (which GitHub refuses with "deny updating a + # hidden ref"). --prune makes deletions on the Gitea side propagate. + git push github --all --prune --force + git push github --tags --prune --force \ No newline at end of file