Notice: 函数 WP_Scripts::localize 的调用方法不正确$l10n 参数必须是一个数组。若要将任意数据传递给脚本,请改用 wp_add_inline_script() 函数。 请查阅调试 WordPress来获取更多信息。 (这个消息是在 5.7.0 版本添加的。) in /data/www/appblog/wp-includes/functions.php on line 6131

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包