GitLab客户端下载包体大小调整和文本换行符的自动替换

近期项目需要做android移植的工作,故开始在windows上进行环境的搭建。在Windows上的进展可不如想象的顺利。近期解决了如下两个问题:


(一)在windows上总是出现错误,无法获取代码。出现的错误是这样的:

RPC failed; result=18, HTTP code = 200

在网上搜了很多相关内容,多数要求从客户端本身入手,增大buf上限。可最终发现都无效。

最后,发现问题出在gitlab服务端的限定上,现在把解决的过程和步骤记录如下:

1)nginx client_max_body_size:

vi /etc/nginx/nginx.conf

client_max_body_size 50M;

## check and reload nginx config

nginx -t

nginx -s reload

2)gitlab timeout:

## need to enter gitlab container firstly

## then edit the config

vi config/unicorn.rb

timeout 300

## then restart gitlab in container

## remember that must be in container

/etc/init.d/gitlab restart

3)git http.postBuffer:

## modify in commandline

git config --global http.postBuffer 524288000

## check config list

git config --list


(二)文件结尾换行符。

代码库中的换行符原本都是UNIX格式的,但在windows下下载之后,都变为了Windows格式的换行符,这种换行符在编译的过程中会出现很多问题。

修改的方式就是,关闭自动更改换行符的功能,具体的方法如下图,将途中红框中的选项设置为与图中一致即可:

GitLab客户端下载包体大小调整和文本换行符的自动替换_第1张图片

你可能感兴趣的:(GitLab客户端下载包体大小调整和文本换行符的自动替换)