I am trying to clone a git repository from a GOGS server which is located on a Raspberry Pi 3. It fails with the following complaint:
git clone git@192.168.0.62:axelle/prog.git
Cloning into 'prog'...
remote: Enumerating objects: 3008, done.
remote: Counting objects: 100% (3008/3008), done.
error: pack-objects died of signal 9541/2583)
error: git upload-pack: git-pack-objects 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: index-pack failed
As I use the repository from another host without any problem, I don't think there is any corruption. Rather, when I log on the server, I see RAM go drastically down, then basically the Pi freezes, and a short while after I get the error on client side, and my Pi server regains its memory. So, I think my clone fails because I fall out of memory on the Rpi.
I have seen several solutions which basically consist in using commands such as the following. But to be honest, I don't really understand if I should put a small window memory & size limit, or a big one. Anyway, I tried with 20m and 100m, and nothing worked :(
$ git config --global pack.windowMemory "100m"
$ git config --global pack.SizeLimit "100m"
$ git config --global pack.threads "1"
$ git config --global pack.window "0"
$ git config --global core.bigfilethreshold 200K
With regards to big files - which might be another reason the clone fails, I probably have a few big files, but not too much. How can I check what's the biggest file of my repository? and should I then set core.bigfilethreshold
slightly above?
Also, I saw some people recomment git fsck
, but that does not work for me because my repository is not cloned.
Finally, I am not sure that the commands above will solve my problem, and I'd appreciate anyother solution so that I can clone my repo :) If there's a way to see the issue precisely on server's side, let me know too.
Logs:
On RPi (server) side, I have the following logs. I don't think they are relevant though, especially the 2nd one is about another repository (docs), while I am trying to clone (prog):
home/git/gogs/log $ sudo cat serv.log
2021/08/27 11:13:05 [FATAL] [...ogs/gogs/cmd/serv.go:268 runServ()] Fail to execute git command: exit status 128
/home/git/gogs/log $ sudo cat gogs.log
2021/08/27 00:16:18 [ WARN] Failed to perform health check on repository '/home/git/gogs-repositories/axelle/docs.git': execution is timeout [duration: 1m0s]
Edited (Sept 2, 2021)
- I'm looking for a solution where I keep the GOGS server on the RPi 3. This means I'm not considering a solution where I upgrade to RPi 4, or add RAM to my RPI...
- I tried a
git clone --depth 1 git@192.168.0.62:axelle/prog.git
which is probably close to working... but fails out of memory just by the end.
Output:
git clone --depth 1 --branch master git@192.168.0.62:axelle/prog.git
Cloning into 'prog'...
remote: Enumerating objects: 1355, done.
remote: Counting objects: 100% (1355/1355), done.
error: --shallow-file died of signal 98/1125)
error: git upload-pack: git-pack-objects 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: index-pack failed