Git, WSL2, SSH: unexpected disconnect while reading sideband packet

The WiFi networking card on my laptop was the root cause. My card is killer wifi but also read the same happening to Intel WiFi cards.

Upgrading the WiFi card drivers immediately fixed the issue.

Still completely lost on me how a networking drive ended up causing this strange git error issue.


export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1

git config --global core.compression 0
git clone --depth 1 <repo_URI>
# cd to your newly created directory
git fetch --unshallow 
git pull --all

The trick for me was --no-tags:

git clone --no-tags ssh://[email protected]/repo/project.git