[go: up one dir, main page]

grpc received message larger than max when git push

When mirror some large repository (such as pytorch) to gitlab, something like:

git clone --mirror https://github.com/pytorch/pytorch.git

# copy the bare repository to some intranet

git push --mirror https://gitlab.myhost.com/pytorch/pytorch_mirror.git

the git push fails totally with empty project and the console output:

! [remote rejected] vxxx -> vxxx (pre-receive hook declined)

and the `gitaly_hooks.log is:

time="xxxx", level=fatal msg="error when receiving data for pre-receive hook: rpc error: code = ResourceExhausted desc grpc: received message larger than max (8084447 vs. 4194304)

How to skip the problem, such as disable the pre-receive hook