Hi @Nagendrababu ,
You may try below steps if GitLab is Self-Managed
The fix is increase the max upload size in GitLab’s NGINX reverse proxy.
1. Open GitLab configuration
sudo nano /etc/gitlab/gitlab.rb
2. Add or edit:
nginx['client_max_body_size'] = '2048m' # or larger
gitlab_rails['gitlab_shell_receive_pack_timeout'] = 1200
gitlab_rails['gitlab_shell_upload_pack_timeout'] = 1200
(2 GB is often enough, but you can set more.)
3. Apply changes
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
Then push again.
Or if it is GitLab.com (cloud/SaaS)
Try pushing in smaller chunks instead of one huge mirror
Option A — Push branches one by one
git remote add gitlab <url>
for branch in $(git for-each-ref --format='%(refname)' refs/heads); do
git push gitlab $branch
done
git push --tags gitlab
Option B — Push without refs first, then push refs
This avoids one huge pack:
git push --mirror --no-tags gitlab
git push --tags gitlab
Thanks