When I try to push an existing repo to a new repo: error: RPC failed; result=22, HTTP code = 413

I did some research and it seems like I need to edit the nginx.conf to increase the client_max_body_size.

Where is the nginx.conf file for Gitlab though? I cannot seem to find it.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

The GitLab One-Click app uses the “omnibus” version of GitLab. The full-stack required to run is GitLab managed together rather than installed as separate pieces. The configuration file is located in /etc/gitlab/gitlab.rb

In order to add a custom Nginx setting, you’ll need to add something like the following to your configuration.

nginx['custom_gitlab_server_config'] = "client_max_body_size 200M;"

Then run sudo gitlab-ctl reconfigure for the change to take effect.

See the GitLab documentation for more information on configuring Nginx:

Submit an Answer