Error: RPC failed; HTTP 524 curl 22 The requested URL returned error: 524

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

I am trying to reduce the size of my repository, currently about 9.7GB. So I proceeded as follows:

  1. Export the project bundle from my repository.

  2. Extract the downloaded project bundle.

$ tar  xzf 2022-02-22_12-50-017_my_project_export.tar.gz
  1. Clone the export project bundle.
$ git clone --bare --mirror project.bundle
Cloning into bare repository 'project.git'...
Receiving objects: 100% (1310/1310), 9.73 GiB | 44.38 MiB/s, done.
Resolving deltas: 100% (232/232), done.
  1. Change to project.git repo.
$ cd project.git
  1. Analyze repo.
$ git filter-repo --analyze
Processed 1066 blob sizes
Processed 54 commits
Writing reports to ./filter-repo/analysis...done.

6 .Purge files larger than 50M

$ git filter-repo --strip-blobs-bigger-than 50M
Processed 1066 blob sizes
Parsed 54 commits
New history written in 0.05 seconds; now repacking/cleaning...
Repacking your repo and cleaning out old unneeded objects
Enumerating objects: 1247, done.
Counting objects: 100% (1247/1247), done.
Delta compression using up to 8 threads
Compressing objects: 100% (1036/1036), done.
Writing objects: 100% (1247/1247), done.
Building bitmaps: 100% (48/48), done.
Total 1247 (delta 212), reused 1181 (delta 189), pack-reused 0
Completely finished after 16.05 seconds.
  1. Delete remote origin
$ git remote remove origin
Note: Some branches outside the refs/remotes/ hierarchy were not removed;
to delete them, use:
  git branch -d dev
  git branch -d master

$ git remote add origin https://gitlab.com/my_project.git
  1. Force push your changes to overwrite all branches on GitLab.
$ git push origin --force 'refs/heads/*'
Username for 'https://gitlab.com': arilwan
Password for 'https://arilwan@gitlab.com': 
Enumerating objects: 1247, done.
Writing objects: 100% (1247/1247), 2.05 GiB | 20.38 MiB/s, done.
Total 1247 (delta 0), reused 0 (delta 0), pack-reused 1247
error: RPC failed; HTTP 524 curl 22 The requested URL returned error: 524
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date

This problem has been reported several times on Gitlab Forum and Stack Overflow, but there is no solution yet. Could you please look into it.

Edited Aug 11, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading