# Remote: Aborting due to possible repository corruption

**URL:** <https://forum.gitea.com/t/remote-aborting-due-to-possible-repository-corruption/6617>\
**Category:** Install/Maintain/Configure\
**Created:** [January 27, 2023, 12:12am UTC](https://forum.gitea.com/t/remote-aborting-due-to-possible-repository-corruption/6617 "2023-01-27T00:12:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gitux](https://avatars.discourse-cdn.com/v4/letter/g/e274bd/32.png) [@Gitux](https://forum.gitea.com/u/Gitux)\
**Post date:** [January 27, 2023, 12:12am UTC](https://forum.gitea.com/t/remote-aborting-due-to-possible-repository-corruption/6617/1 "2023-01-27T00:12:00Z")

</div>

I have a large repository with some relatively large files in it. Total repository size is +/- 20GB with some files that are several GB.

I have found that I can push to the repository, but not clone. Ultimately it appears that this is a memory issue which was confirmed by watching docker process statistics which show it consuming all available memory before dying, but I have not found a solution and/or maybe I am applying it incorrectly.

## The Error

> error: pack objects died of signal 9  
> error: git upload-pack: git-pack died with error.  
> fatal: git upload-pack: aborting due to possible repository corruption on the remote side.  
> remote: aborting due to possible repository corruption on the remote side.
> 
> fatal: early EOF  
> fatal: fetch-pack: invalid index-pack output  
> Gittea: internal error
> 
> git did not exit cleanly (exit code 128)…405s

## Server Configuration

- Gitea v1.17 run via Docker
- RAM: 1GB
- Processor: 1 Core
- OS: Ubuntu
- SSH Shim setup

## Fix References

- [GIT pull error - remote object is corrupted](https://stackoverflow.com/questions/4170317/git-pull-error-remote-object-is-corrupted)

Can someone explain how to apply this to the docker instance? If I execute the bash within docker using the interactive flag I can add the git flags, but then when the docker container restarts they are gone. So how do I persist these settings? Then, do I need to re-commit the repository for them to take effect?

Additionally, do I need to apply any settings to the primary server, or only within the “git” configuration of the docker instance?

Ideally I would like to retain compression because it shrinks things significantly but I am limited on resources (RAM). This is a small repository on a VPS used by only a couple people for reference.

Thank you.

---

<div class="post-metadata">

**Author:** ![jake](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jake](https://forum.gitea.com/u/jake)\
**Post date:** [January 27, 2023, 11:41am UTC](https://forum.gitea.com/t/remote-aborting-due-to-possible-repository-corruption/6617/2 "2023-01-27T11:41:06Z")

</div>

To apply the fix from StackOverflow post, you can either edit `[repository.root]/user/repo.git/config` for just the one large repo or edit `/var/lib/gitea/.gitconfig` for all repositories and add:

```auto
[pack]
         windowMemory = 100m
         SizeLimit = 100m
         threads = 1

```

Alternatively, add `window = 0` instead of windowMemory, SizeLimit, … to disable packing entirely, but note that cloning will be less efficient.
