0

There are two rhel servers. One is GitLab (server A) and another server (server B) is where I want to run git clone command to checkout remote repo and run all git add/commit/push commands. It was working just fine until I accidentally pushed a large jar file into the remote repo under master branch. There are no developers except myself to use.

I see the commit I made with the large jar file and I want to physically remove it from GitLab but so far I failed it.

From reading stackoverflow, I was able to revert back to previous commit in the server B but GitLab still retains the commit with large file.

Then I blew away existing copy of local repo from the server B then ran git clone then I ran into this problem.

git clone git@<server A>:example/someproject.git
Cloning into 'someproject'...
remote: Enumerating objects: 187, done.
remote: Counting objects: 100% (187/187), done.
remote: Compressing objects: 100% (115/115), done.
remote: fatal: Out of memory, malloc failed (tried to allocate 535136313 bytes)
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the re                                                                                    mote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed

I have a feeling that commit one before last in where large jar file is pushed causing this chaos.

I researched each fatal error but I couldn't connect dots to either how to delete the problematic commit from GitLab nor checkout remote repo to the server B.

At this point, I'd like take any advice/thought on this matter. Just for note, if I tried to view that problematic commit, I get 503 error. For other commits (simple text change), I can view them just fine.

DaeYoung
  • 1,161
  • 6
  • 27
  • 59
  • https://stackoverflow.com/questions/53772415/how-to-reset-clean-a-gitlab-repository thread found a solution for me. – DaeYoung Aug 29 '23 at 18:07

0 Answers0