Issues using "git push --mirror" on self-hosted CE

Currently having issues migrating a repository from one git server to another. Pulled the repository down using --mirror to capture everything and am attempting to push it up with “git push --mirror newgitlabserver” and I keep getting pre-receive hooks rejected. I’m not sure where to go from here. I’d like to keep all of the commit history if I can and that’s why I’m trying to mirror it over.

git push --mirror “https://selfhostedserver/group/project.git
Enumerating objects: 11295, done.
Counting objects: 100% (11295/11295), done.
Delta compression using up to 4 threads
Compressing objects: 100% (5701/5701), done.
Writing objects: 100% (11295/11295), 147.06 MiB | 50.77 MiB/s, done.
Total 11295 (delta 3448), reused 11295 (delta 3448), pack-reused 0
remote: Resolving deltas: 100% (3448/3448), done.
To https://selfhostedserver/group/project.git
! [remote rejected] branch1 → branch1 (pre-receive hook declined)
! [remote rejected] dev → dev (pre-receive hook declined)
! [remote rejected] branch2 → branch2 (pre-receive hook declined)
! [remote rejected] master → master (pre-receive hook declined)
! [remote rejected] branch3 → branch3 (pre-receive hook declined)
error: failed to push some refs to ‘https://selfhostedserver/group/project.git

Figured out the issue. The script was getting blocked by FAPolicyD.

1 Like