3

I'm trying to fix my repository with BFG Repo-Cleaner, by removing some large files that were added to it, using this guide: https://rtyley.github.io/bfg-repo-cleaner/. When I'm trying to push (a very large push), I'm getting: "remote: GitLab: Push operation timed out".

The output I receive when pushing consists of the following:

numerating objects: 12176, done.
Writing objects: 100% (12176/12176), 4.15 MiB | 3.89 MiB/s, done.
Total 12176 (delta 0), reused 0 (delta 0), pack-reused 12176
remote: Resolving deltas: 100% (8566/8566), done.
remote: GitLab: Push operation timed out
remote:
remote: Timing information for debugging purposes:

remote: Running checks for ref: feature/XXXXXX1
remote: Running checks for ref: hotfix/XXXXXXX2
remote: Running checks for ref: hotfix/XXXXXXX3
remote: Running checks for ref: hotfix/XXXXXXX4
remote: Running checks for ref: main
remote: Running checks for ref: sandbox/XXXXXXX5
remote: Running checks for ref:
remote: Running checks for ref:
remote: Running checks for ref:
remote: Running checks for ref:
remote: Running checks for ref:

Followed by:

[remote rejected]   refs/merge-requests/115/head -> refs/merge-requests/115/head (deny updating a hidden ref)
 ! [remote rejected]   refs/merge-requests/115/merge -> refs/merge-requests/115/merge (deny updating a hidden ref)
 ! [remote rejected]   refs/merge-requests/116/head -> refs/merge-requests/116/head (deny updating a hidden ref)
 ! [remote rejected]   refs/merge-requests/116/merge -> refs/merge-requests/116/merge (deny updating a hidden ref)
 ! [remote rejected]   refs/merge-requests/117/head -> refs/merge-requests/117/head (deny updating a hidden ref)
 ! [remote rejected]   refs/merge-requests/117/merge -> refs/merge-requests/117/merge (deny updating a hidden ref)

Is there any way to fix that?

EladG
  • 63
  • 5
  • 1
    Every message that starts with `remote:` is coming, not from your own `git push`, but rather from some software *on* the remote (i.e., on the GitLab server). Therefore any problems here have to be fixed *on* the remote, i.e., on the GitLab server, or else somehow avoided from your end. In your particular case the latter is probably not possible. The `timing information` printed here is probably meant for the *administrator of the GitLab software*, i.e., you should forward this to your GitLab support people and ask *them*. – torek Feb 21 '22 at 10:32
  • Hi, thank you! I'll contact GitLab support about it and see if they can help. – EladG Feb 21 '22 at 10:36

1 Answers1

0

GitLab no longer supports using BFG and now supports git filter-repo

In previous versions of GitLab, the repository cleanup supported using the BFG object map.

The current recommended procedure is

  • Export the project
  • From the bundle, bare mirror clone to a fresh repository
  • Run the cleanup, using git filter-repo
  • Force push the heads, tags, and replace refs
  • Wait 30 minutes
  • Run the Repository Cleanup using the commit-map in .git/filter-repo/

Then the cleanup process will remove all of the dereferenced files or commits.

BenH
  • 9,766
  • 1
  • 22
  • 35