Имеется центральный репозиторий Git.
Настроен по статье Git: свой репозиторий под NGINX + WebDAV + uWSGI.
При добавлении новых файлов в удалённый репозиторий – Git сообщает об ошибке:
$ git push zeus master
Counting objects: 5483, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5343/5343), done.
error: RPC failed; result=22, HTTP code = 413
fatal: The remote end hung up unexpectedly
Writing objects: 100% (5483/5483), 463.89 MiB | 18.38 MiB/s, done.
Total 5483 (delta 1595), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
Everything up-to-date
В логе NGINX появляется ошибка:
2015/03/03 12:49:00 [error] 20909#0: *20 client intended to send too large chunked body: 1040520+8192 bytes, client: 10.249.140.96, server: zeus.domain.com, request: “POST /LMS.git/git-receive-pack HTTP/1.1”, host: “zeus.domain.com”
Решение – увеличить параметр client_max_body_size
в конфигурации NGINX.
В блок location
добавляем строку:
location / { ... client_max_body_size 0; ...
0 – неограниченный размер.
Перезапускаем – готово:
# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
# service nginx restart Stopping nginx: [ OK ] Starting nginx: [ OK ]