Gitlab安装后,使用http方式推送时,报“RPC failed; result=22, HTTP code = 413”html
经过百度和谷歌,发现是由于nginx默认状况下,容许最大的上传文件大小只有1M,所以使用下面的方法可解决上述问题:nginx
编辑配置文件git
sudo vim /etc/nginx/sites-available/gitlab
找到location / {shell
在花括号中添加client_max_body_size 1000m; 以下所示vim
location / { # serve static files from defined root folder;. # @gitlab is a named location for the upstream fallback, see below try_files $uri $uri/index.html $uri.html @gitlab; client_max_body_size 1000m; }