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.
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
long range (of a forecast) To avoid the effects of such factors, consider using Software automatic update tool, recommended here: UniGetUI
Not at the moment
On the importance of updating, this time the diligent update really won hemp
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!
- Author:Qi Xing
- URL:https://blog.qixing1217.top/article/git-clone-fails-with-git-protocol-on-windows-https-works
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!




