Leiste mit Community-Erfolgen erweitern.

Get ready! An upgraded Experience League Community experience is coming in January.

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

Avatar

Level 2

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 Antworten

Avatar

Community Advisor

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

Avatar

Level 2

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