Gitlab HTTP 413 curl 22 Request Entity Too Large

错误信息

git.exe push -v --progress "origin" master

Counting objects: 322, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (322/322), done.
POST git-receive-pack (chunked)
Writing objects: 100% (322/322), 118.46 MiB | 16.21 MiB/s, done.
Total 322 (delta 57), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
Pushing to http://code.yezhou.me/Document/AlgorithmApp.git
Everything up-to-date

git did not exit cleanly (exit code 1) (53516 ms @ 2017/7/2 18:37:36)

解决方法

# sudo -u git -H vim config/gitlab.yml
# sudo -u git service gitlab restart

修改max_size大小:

## Git settings
# CAUTION!
# Use the default values unless you really know what you are doing
git:
  bin_path: /usr/bin/git
  # The next value is the maximum memory size grit can use
  # Given in number of bytes per git object (e.g. a commit)
  # This value can be increased if you have very large commits
  max_size: 52428800 # 20.megabytes
  # Git timeout to read a commit, in seconds
  timeout: 10

注意:如果采用Nginx反向代理配置域名,则需要设置client_max_body_size(上传文件大小限制)

server {
    listen       80;
    server_name  code.yezhou.me;

    location / {
        client_max_body_size  0;  #表示不限制
        proxy_pass  http://xxx.xxx.xxx.xxx:88;
    }
}
上一篇 Gitlab目录层级超过6级报500错误不能显示文件列表的问题解决
下一篇 CentOS下安装Git rpm包
目录
文章列表
1 Android自定义支持多层嵌套RadioButton的RadioGroup
Android自定义支持多层嵌套RadioButton的RadioGroup
2
Hexo修改highlight代码样式
Hexo修改highlight代码样式
3
React Native通用Tab组件react-native-scrollable-tab-view自定义TabBar
React Native通用Tab组件react-native-scrollable-tab-view自定义TabBar
4
Nacos实现Zuul网关动态路由配置刷新
Nacos实现Zuul网关动态路由配置刷新
5
Spring Security用户认证成功失败自定义实现
Spring Security用户认证成功失败自定义实现
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。