Git Clone on Windows fails the Git way, but HTTPS works fine and ssh -T git@github.com  normalcy
Lazy loaded imageGit Clone on Windows fails the Git way, but HTTPS works fine and ssh -T git@github.com normalcy
Words 295Read Time 1 min
2024-12-18
2025-5-22
AI intelligent summary
GPT
Git Clone on Windows fails in Git protocol mode (showing errors like "Connection closed by remote host") while HTTPS and SSH work fine. The solution is to update **Git for Windows** via command line or GUI to restore proper GitHub connectivity.
This article describes how to solve the problem that Git Clone fails to connect to GitHub on Windows, but HTTPS and SSH work fine. It covers the steps to update Git and git for windows to ensure that Git tools can connect to the GitHub servers properly.
pivot
  • Description of the problem : When using Git Clone, I encountered that the Git connection fails but the HTTPS and SSH connection works fine, with error messages such as "Connection closed by remote host", "client_loop: send disconnect: Broken pipe", and so on.
  • cure : Updating Git and git for windows is the solution to this problem, either through command line tools or the Git GUI.
 

📝 Main content

software version

Windows 11 Professional Git for Windows

I. Problem encountered: Git Clone fails in Git mode

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
still ssh -T git@github.com is able to connect normally, and attempts to use the HTTPS link Clone are able to Clone normally.

II. Solution: Update Git

Just run one of the following commands at the command line
git update git update-git-for-windows

📖 Extended reading

Not at the moment

🤗 Summarize and summarize

On the importance of updating, this time the diligent update really won hemp

📎 Reference article

Main Reference Not available
 
💡
acceptable become a member Telegram's Little Warehouse of Seven Rows | Internet Memories | Blogs  cap Seven lines Technical Exchange Group  Find more tips oh 🥰 and also discuss various issues in the chat group ❓
Welcome to the Bottom comment section. Share your thoughts and experiences with Let's discuss and improve together!

Comments
Loading...