当前位置:   article > 正文

关于gitlab中git push的报错error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413的处理_gitlab rpc error

gitlab rpc error
前言

关于git push中报错处理

报错内容
Enumerating objects: 410, done.
Counting objects: 100% (410/410), done.
Delta compression using up to 6 threads
Compressing objects: 100% (220/220), done.
Writing objects: 100% (227/227), 35.88 MiB | 10.00 MiB/s, done.
Total 227 (delta 151), reused 1 (delta 0)
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
排查过程梳理
  • 1.排查gitlab的推送限制
  • 2.nginx的client_max_body_size设置
操作实施
  • 1.关于上一步骤的第一点,进行如下配置:
    在这里插入图片描述
  • 2.当排查完上一步骤第一点,还出现如上报错,请按照如下流程排查

试着查看nginx的报错信息
在这里插入图片描述这里明显看到了nginx的报错信息,查到了问题的根结所在,需对nginx进行添加
client_max_body_size的配置,详见如下所示:

cat /etc/nginx/conf.d/git.conf
... ...
server {
  listen 80;
  client_max_body_size 1024m;  	#添加此行内容,大小可自行根据实际情况设定
... ...  
server {
  listen 443;
  client_max_body_size 1024m;  	#添加此行内容,大小可自行根据实际情况设定
... ...
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

注:只是配置80服务,而没有配置443服务,可把server的443配置去掉

结语

… …

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/黑客灵魂/article/detail/806684
推荐阅读
相关标签
  

闽ICP备14008679号