Gitlab安装后,使用http方式推送时,报“RPC failed; result=22, HTTP code = 413”
通过百度和谷歌,发现是因为nginx默认情况下,允许最大的上传文件大小只有1M,因此使用下面的方法可解决上述问题:
编辑配置文件
sudo vim /etc/nginx/sites-available/gitlab
找到location / {
在花括号中添加client_max_body_size 1000m; 如下所示
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;
}