当前位置:   article > 正文

GitLab无法提交大文件的问题_gitlab push失败redirecting to enumerating objects

gitlab push失败redirecting to enumerating objects

GitLab无法提交大文件的问题

问题描述

GitLab 当提交大文件时遇到如下报错

MYOPS001@MYOPS001 MINGW64 /e/work/GitLab/system-deploy (main)
$ git push
Enumerating objects: 91, done.
Counting objects: 100% (91/91), done.
Delta compression using up to 16 threads
Compressing objects: 100% (79/79), done.
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (90/90), 138.21 MiB | 7.21 MiB/s, done.
Total 90 (delta 10), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

可能原因

http不支持大文件传输,ssh可以支持的

排查

查看使用的啥协议

git remote -v
origin  https://192.168.155.12:28886/system/trading/system-deploy.git (fetch)
origin  https://192.168.155.12:28886/system/trading/system-deploy.git (push)
  • 1
  • 2
  • 3

设置ssh方式提交

MYOPS001@MYOPS001 MINGW64 /e/work/GitLab/system-deploy (main)
$ git remote set-url origin git@192.168.155.12:system/trading/system-deploy.git 
  • 1
  • 2

生成公私钥完成SSH登录

windows+r打开cmd执行

ssh-keygen
#一路回车
  • 1
  • 2

在git上配置公钥即id_rsa.pub的内容
在这里插入图片描述
在这里插入图片描述

在自己的对应的文件名下设置

C:\Users\MYOPS001\.ssh
  • 1

在对应目录新建config文件内容如下,如果默认端口是22端口则不需要设置此文件
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-tjPcloaP-1688009314076)(./images/image-20230629104143880.png)]

Host 192.168.155.12
Port 2222
  • 1
  • 2

执行推送命令

MYOPS001@MYOPS001 MINGW64 /e/work/GitLab/system-deploy (main)
$ git push
The authenticity of host '[192.168.155.12]:2222 ([192.168.155.12]:2222)' can't
 be established.
ED25519 key fingerprint is SHA256:oPRSGSYC6tC/94ZgU9jIS5AVWriAnNXe/4Udg1/WYcU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[192.168.155.12]:2222' (ED25519) to the list of kno
wn hosts.
Enumerating objects: 91, done.
Counting objects: 100% (91/91), done.
Delta compression using up to 16 threads
Compressing objects: 100% (79/79), done.
Writing objects: 100% (90/90), 138.21 MiB | 5.43 MiB/s, done.
Total 90 (delta 10), reused 0 (delta 0), pack-reused 0
To 192.168.155.12:system/trading/system-deploy.git
   88a32be..b1d12a8  main -> main

MYOPS001@MYOPS001 MINGW64 /e/work/GitLab/system-deploy (main)

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

参考:https://cloud.tencent.com/developer/article/1612644
https://blog.csdn.net/m0_55868614/article/details/120597702

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

闽ICP备14008679号