You get this when you try to push a large commit over HTTP and Nginx decides your request is too big:

RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

The fix is adding one line to your Nginx config. Open /etc/nginx/nginx.conf and find the http, server, or location block you want to change, then add:

client_max_body_size 50m;

The 50m is 50 megabytes. Change it if you need more or less. Then reload Nginx:

sudo service nginx reload

That’s it. Push your commit again and the error should be gone.