解决gitlab限制上传文件大小的问题

2020-12-13 20:15:43

参考地址 解决gitlab限制上传文件大小的问题

问题



git提交时报错如下:

error: RPC failed ...fatal: The remote end hung up unexpectedly

解决方法

  1. 客户端
    增大本地客户端可以上传代码的大小限制,输入下面的命令即可解决

git config --global http.postBuffer 524288000git config --global https.postBuffer 524288000
  1. 服务端
    服务端的限制有两个地方一个是gitlab本身,另外一个是gitlab使用的nginx。
    gitlab本身也是很好解决的,使用管理员用户登录gitlab在设置Account and limit中加大Maximum attachment size (MB)和Maximum push size (MB)即可解决
    nginx的话修改gitlab.rb这个文件中

nginx['enable'] = true
nginx['client_max_body_size'] = '1024m'
nginx['redirect_http_to_https'] = false
nginx['redirect_http_to_https_port'] = 80

之后重启gitlab

gitlab gitlab-ctl reconfigure
gitlab gitlab-ctl restart

还有要注意的是,我在gitlab前面还加了一个nginx用来做反向代理,所以这个nginx的client_max_body_size也要加


  • 2021-04-25 09:53:18

    android debug速度特别慢有时候卡住

    一直提示定在 Starting LLDB server。可能的原因是 Android Studio编译速度太慢了,就会一直卡在Starting LLDB server。可以通过设置 Run/Debug Configurations ——> Debugger ——> Debug type 为 Java 跳过 C/C++的调试,起码实现对 Java 程序的调试

  • 2021-04-25 09:54:19

    sequelize 时区配置

    sequelize 默认情况下, 保存日期时会转换成 +00:00时区,