Facing HTTP 413 While Migrating AEM Forms Repository from TFS to GitLab | Community
Skip to main content
Level 2
Nov 14, 2025 8:24 AM UTC
Question

Facing HTTP 413 While Migrating AEM Forms Repository from TFS to GitLab

I'm facing same issue, currently migrating AEM Forms repository from TFS to GitLab using the following command:
git push --mirror GitLab
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413

It seems to fail due to a HTTP 413 (Request Entity Too Large) error, possibly because of the repository size.
Has anyone encountered a similar issue when pushing large repositories to GitLab?
What's the best way to resolve this?

Regards,
Nagendra

2 replies

MukeshYadav_
New Participant
Nov 16, 2025 11:36 AM UTC

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

Translate
Level 2
Nov 18, 2025 12:22 PM UTC

Hi @mukeshyadav_ 
I'm using GitLab.com (cloud/SaaS)

when I try to use above steps
git push gitlab refs/heads/master:refs/heads/master
Enumerating objects: 270479, done.
Counting objects: 100% (270479/270479), done.
Delta compression using up to 4 threads Compressing objects: 100% (78827/78827), done. error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 send-pack: unexpected disconnect while reading sideband packet Writing objects: 100% (270479/270479), 752.47 MiB | 86.26 MiB/s, done.
Total 270479 (delta 142683), reused 270101 (delta 142427), pack-reused 0 (from 0)
fatal: the remote end hung up unexpectedly
Everything up-to-date

Translate