How to solve Git error HTTP 413

If you have the following error when you push your repository to a remote :

error: RPC failed; result=22, HTTP code = 413
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

The issue may not be linked to git directly, but to your webserver, which may not be able to handle big files upload. Adding the client_max_body_size 50m; directive to the http section of your nginx.conf file, then reload the nginx service, will solve the issue.

Note: you may need a higher value, depending on the size of the repository you’re trying to push.

Adrien Anceau
Geek, gamer, photography enthusiast, passionate about technology, automation and food.
comments powered by Disqus
Back to Top