news 2026/4/17 18:14:32

【git】

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【git】

问题:

推送代码提示下面信息:

16:22:54.422: [C:\git\yang-teambition] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/dev_tianzhi:dev_tianzhi ** WARNING: connection is not using a post-quantum key exchange algorithm. ** This session may be vulnerable to "store now, decrypt later" attacks. ** The server may need to be upgraded. See https://openssh.com/pq.html Enumerating objects: 59, done. Counting objects: 1% (1/59) Counting objects: 3% (2/59) Counting objects: 5% (3/59) Counting objects: 6% (4/59) Counting objects: 8% (5/59) Counting objects: 10% (6/59) Counting objects: 11% (7/59) Counting objects: 13% (8/59) Counting objects: 15% (9/59) Counting objects: 16% (10/59) Counting objects: 18% (11/59) Counting objects: 20% (12/59) Counting objects: 22% (13/59) Counting objects: 23% (14/59) Counting objects: 25% (15/59) Counting objects: 27% (16/59) Counting objects: 28% (17/59) Counting objects: 30% (18/59) Counting objects: 32% (19/59) Counting objects: 33% (20/59) Counting objects: 35% (21/59) Counting objects: 37% (22/59) Counting objects: 38% (23/59) Counting objects: 40% (24/59) Counting objects: 42% (25/59) Counting objects: 44% (26/59) Counting objects: 45% (27/59) Counting objects: 47% (28/59) Counting objects: 49% (29/59) Counting objects: 50% (30/59) Counting objects: 52% (31/59) Counting objects: 54% (32/59) Counting objects: 55% (33/59) Counting objects: 57% (34/59) Counting objects: 59% (35/59) Counting objects: 61% (36/59) Counting objects: 62% (37/59) Counting objects: 64% (38/59) Counting objects: 66% (39/59) Counting objects: 67% (40/59) Counting objects: 69% (41/59) Counting objects: 71% (42/59) Counting objects: 72% (43/59) Counting objects: 74% (44/59) Counting objects: 76% (45/59) Counting objects: 77% (46/59) Counting objects: 79% (47/59) Counting objects: 81% (48/59) Counting objects: 83% (49/59) Counting objects: 84% (50/59) Counting objects: 86% (51/59) Counting objects: 88% (52/59) Counting objects: 89% (53/59) Counting objects: 91% (54/59) Counting objects: 93% (55/59) Counting objects: 94% (56/59) Counting objects: 96% (57/59) Counting objects: 98% (58/59) Counting objects: 100% (59/59) Counting objects: 100% (59/59), done. Delta compression using up to 20 threads Compressing objects: 3% (1/27) Compressing objects: 7% (2/27) Compressing objects: 11% (3/27) Compressing objects: 14% (4/27) Compressing objects: 18% (5/27) Compressing objects: 22% (6/27) Compressing objects: 25% (7/27) Compressing objects: 29% (8/27) Compressing objects: 33% (9/27) Compressing objects: 37% (10/27) Compressing objects: 40% (11/27) Compressing objects: 44% (12/27) Compressing objects: 48% (13/27) Compressing objects: 51% (14/27) Compressing objects: 55% (15/27) Compressing objects: 59% (16/27) Compressing objects: 62% (17/27) Compressing objects: 66% (18/27) Compressing objects: 70% (19/27) Compressing objects: 74% (20/27) Compressing objects: 77% (21/27) Compressing objects: 81% (22/27) Compressing objects: 85% (23/27) Compressing objects: 88% (24/27) Compressing objects: 92% (25/27) Compressing objects: 96% (26/27) Compressing objects: 100% (27/27) Compressing objects: 100% (27/27), done. Writing objects: 2% (1/37) Writing objects: 5% (2/37) Writing objects: 8% (3/37) Writing objects: 10% (4/37) Writing objects: 13% (5/37) Writing objects: 16% (6/37) Writing objects: 18% (7/37) Writing objects: 21% (8/37) Writing objects: 24% (9/37) Writing objects: 27% (10/37) Writing objects: 29% (11/37) Writing objects: 32% (12/37) Writing objects: 35% (13/37) Writing objects: 37% (14/37) Writing objects: 40% (15/37) Writing objects: 43% (16/37) Writing objects: 45% (17/37) Writing objects: 51% (19/37) Writing objects: 54% (20/37) Writing objects: 56% (21/37) Writing objects: 59% (22/37) Writing objects: 62% (23/37) Writing objects: 64% (24/37) Writing objects: 67% (25/37) Writing objects: 70% (26/37) Writing objects: 72% (27/37) Writing objects: 75% (28/37) Writing objects: 78% (29/37) Writing objects: 81% (30/37) Writing objects: 83% (31/37) Writing objects: 86% (32/37) Writing objects: 89% (33/37) Writing objects: 91% (34/37) Writing objects: 94% (35/37) Writing objects: 97% (36/37) Writing objects: 100% (37/37) Writing objects: 100% (37/37), 3.62 KiB | 463.00 KiB/s, done. Total 37 (delta 18), reused 0 (delta 0), pack-reused 0 (from 0) Read from remote host gitlab.xxx.com: Connection reset by peer client_loop: send disconnect: Connection reset by peer send-pack: unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly

这是 Git 在推送代码到远程仓库时,连接被远端强制断开Connection reset by peer)导致的失败。常见原因和解决方式如下:


可能原因与对应处理

原因说明解决方式
1. 大文件或提交过多你这次推送了 37 个对象,虽然不算特别大,但如果包含大文件(如 PDF、图片、jar 包),容易触发 GitLab 的限制。检查是否有大文件被提交:
`git rev-list --objects --all
grep -E '.(pdf|jar|zip|png|jpg)'<br>如有,用git filter-repoBFG` 清理历史。
2. 网络不稳定 / VPN 中断你公司 GitLab 地址是gitlab.hezhihulian.com,可能是内网或 VPN 环境,连接中断。重试几次:
git push origin dev_tianzhi
或换网络 / 换 SSH 端口。
3. GitLab 服务器限制服务端配置了超时或最大包大小限制(如 Nginx、GitLab 本身的git timeout)。联系运维确认 GitLab 日志/var/log/gitlab/gitlab-workhorse/current是否报错。
4. SSH 密钥或权限问题虽然报错不是权限拒绝,但某些 GitLab 版本在权限异常时会直接断连。确认你有dev_tianzhi分支的推送权限,且 SSH key 已正确配置。

你可以立即尝试的排查/修复步骤

  1. 重试推送(最简单):

    git push origin dev_tianzhi
  2. 减小包大小(分批推送): 如果你本地有多个提交,可以尝试分批次推送:

    git rebase -i HEAD~10 # 把多个提交合并成1~2个 git push origin dev_tianzhi
  3. 使用 HTTPS 推送测试(排除 SSH 问题):

    git remote set-url origin https://gitlab.yang.com/xxx/xxx.git git push origin dev_tianzhi
  4. 检查是否有大文件

    git ls-tree -r -l dev_tianzhi | sort -k4 -n | tail -10



版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/4/18 3:32:29

用Sambert-HifiGan为电子书添加多情感朗读功能

用Sambert-HifiGan为电子书添加多情感朗读功能 &#x1f4cc; 技术背景&#xff1a;为何需要多情感语音合成&#xff1f; 传统的电子书朗读功能大多依赖于单一语调的TTS&#xff08;Text-to-Speech&#xff09;系统&#xff0c;语音机械、缺乏情感变化&#xff0c;长时间收听容…

作者头像 李华
网站建设 2026/4/17 18:15:41

利用AI智能系统一键生成专业严谨的开题报告PPT范例推荐

AI工具开题报告生成能力对比速览 工具名称 生成速度 内容完整度 参考文献质量 适用场景 AIbiye ⚡⚡⚡⚡ ⭐⭐⭐⭐ 15真实文献 理工科开题 AICheck ⚡⚡⚡ ⭐⭐⭐⭐⭐ 自动匹配领域 人文社科类 秒篇 ⚡⚡⚡⚡⚡ ⭐⭐⭐ 基础文献支持 紧急需求 AskPaper ⚡…

作者头像 李华
网站建设 2026/4/18 0:49:46

Sambert-HifiGan在智能交通系统中的语音提示应用

Sambert-HifiGan在智能交通系统中的语音提示应用 引言&#xff1a;让交通更“会说话”——多情感语音合成的现实需求 随着城市化进程加快&#xff0c;智能交通系统&#xff08;ITS&#xff09;正从“看得见”向“听得懂、说得出”的方向演进。传统的交通广播提示往往采用机械式…

作者头像 李华
网站建设 2026/4/18 4:28:26

极客日报精选:最值得关注的开源视频项目TOP5

极客日报精选&#xff1a;最值得关注的开源视频项目TOP5 在AIGC&#xff08;人工智能生成内容&#xff09;浪潮席卷全球的当下&#xff0c;图像到视频&#xff08;Image-to-Video, I2V&#xff09;生成技术正成为创意产业与AI工程领域交叉融合的核心赛道。相比静态图像生成&am…

作者头像 李华
网站建设 2026/4/18 11:04:25

JAVA同城陪诊新篇:预约陪护小程序APP源码

以下是一套基于 JAVA 技术的同城陪诊预约陪护小程序 APP 源码的核心架构与功能解析&#xff0c;该系统通过数字化手段优化医疗陪护服务流程&#xff0c;提供便捷、安全、贴心的陪诊体验&#xff1a;一、技术架构后端框架&#xff1a;Spring Boot 3.x&#xff1a;提供快速开发、…

作者头像 李华
网站建设 2026/4/18 11:06:29

医院陪护新助手:JAVA同城陪诊小程序源码

以下是一套基于JAVA技术的同城陪诊小程序源码的核心架构与功能解析&#xff0c;该系统旨在为老年人及有需求的患者提供便捷、安全、贴心的陪诊服务&#xff1a;一、技术架构后端框架&#xff1a;Spring Boot&#xff1a;提供快速开发、易于部署和扩展的微服务架构&#xff0c;支…

作者头像 李华