Windows下 Git Clone时Git方式失败,但HTTPS正常,且ssh -T git@github.com 正常
Lazy loaded imageWindows下 Git Clone时Git方式失败,但HTTPS正常,且ssh -T git@github.com 正常
字数 478阅读时长 2 分钟
2024-11-4
2025-3-31
AI智能摘要
GPT
文章描述了在Windows下使用Git Clone时,Git方式连接失败但HTTPS和SSH方式正常的问题,解决方法是更新Git和Git for Windows。
文章介绍了在 Windows 下使用 Git Clone 时,遇到 Git 方式连接失败但 HTTPS 和 SSH 方式正常的问题,以及解决这一问题的方法。主要包括更新 Git 和 git for windows 的步骤,以确保 Git 工具能够正常连接到 GitHub 服务器。
要点
  • 问题描述: 在使用 Git Clone 时,遇到 Git 方式连接失败但 HTTPS 和 SSH 方式正常,报错信息包括 "Connection closed by remote host"、"client_loop: send disconnect: Broken pipe" 等。
  • 解决方法: 更新 Git 和 git for windows 是解决这一问题的方法,可以通过命令行工具或者 Git GUI 进行更新。
各种类型供您挑选,包您满意
✈️
机场测评与安利
机场测评与安利

📝 主要内容

软件版本

Windows 11 专业版 Git for Windows

一. 所遇问题:Git Clone时Git方式失败

remote: Enumerating objects: 941, done. remote: Counting objects: 100% (768/768), done. remote: Compressing objects: 100% (604/604), done. Connection to github.com closed by remote host. client_loop: send disconnect: Broken pipe fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output
但是 ssh -T git@github.com 是正常能够连接的,且尝试使用HTTPS的链接Clone能够正常Clone

二. 解决方案:更新Git

在命令行运行以下命令之一即可
git update git update-git-for-windows

📖 延伸阅读

暂无

🤗 总结归纳

论更新的重要性,这次勤更新真的赢麻了
各种类型供您挑选,包您满意
✈️
机场测评与安利
机场测评与安利

📎 参考文章

主要参考 暂无
 
💡
还可以加入Telegram的七行的小仓库|互联网记忆|博客 七行 技术交流群 找到更多小技巧哦🥰,还可以在聊天群探讨各种问题❓
欢迎在底部评论区分享您的想法和经验,让我们一起共同探讨,共同进步!

评论
Loading...