From 198415c42e2f07c29a1dbb858fc43c7bc8274790 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Thu, 23 Jul 2026 18:34:21 +0200 Subject: [PATCH] Fix GitLab mirror failing on GitHub PR refs The mirror workflow cloned with --mirror and pushed all refs, including GitHub's refs/pull/*, which GitLab rejects as hidden refs, failing the whole push. Clone --bare and push only refs/heads/* and refs/tags/* with --prune, keeping deletion sync while never touching PR refs. --- .github/workflows/mirror-to-gitlab.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mirror-to-gitlab.yml b/.github/workflows/mirror-to-gitlab.yml index 6c24196..9b8f13c 100644 --- a/.github/workflows/mirror-to-gitlab.yml +++ b/.github/workflows/mirror-to-gitlab.yml @@ -24,7 +24,7 @@ jobs: - name: Mirror repository to GitLab run: | - git clone --mirror "https://github.com/${GITHUB_REPOSITORY}.git" repo.git + git clone --bare "https://github.com/${GITHUB_REPOSITORY}.git" repo.git cd repo.git git remote set-url --push origin git@gitlab.com:RetroShare/RetroShareWebUI.git - git push --mirror + git push --prune origin 'refs/heads/*:refs/heads/*' 'refs/tags/*:refs/tags/*'