From d1af0a357a94c47d0e486bee1e5052df660cfa1f Mon Sep 17 00:00:00 2001 From: Gio Date: Thu, 23 Jul 2026 18:34:13 +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 5aa96a8..4b1b61b 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/BitDHT.git - git push --mirror + git push --prune origin 'refs/heads/*:refs/heads/*' 'refs/tags/*:refs/tags/*'