Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

FATAL ERROR: Server unexpectedly closed network connection

Harikrishna.Pasavala1
November 21, 2023

Hi, I am getting this below error and tried multiple solutions, but they didn't work for me. Can any one help me on this ?

git -c filter.lfs.smudge= -c filter.lfs.required=false -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks clone --branch master git@git.ng.bluemix.net:**********/wcs9.git C:\wcs9
Cloning into 'C:\wcs9'...
FATAL ERROR: Server unexpectedly closed network connection
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: index-pack failed
Completed with errors, see above.

Thanks inadvance!

1 answer

0 votes
Martin Runge
Community Champion
June 17, 2026

Hi @Harikrishna.Pasavala1

I would focus on how Git handles SSH packet sizes and keepalive intervals during long cloning operations over a slower remote host. The FATAL ERROR: Server unexpectedly closed network connection message regularly occurs when the server times out during a massive, quiet data transfer or drops packets that exceed the standard MTU size.

  • Open your command terminal and execute git config --global core.compression 0 to turn off delta compression, which lowers the data processing load on both endpoints.
  • Run the terminal command git config --global http.postBuffer 524288000 to expand your packet overhead threshold.
  • Insert the string parameters Host * followed by an indented newline containing ServerAliveInterval 30 and ServerAliveCountMax 100 to actively force your SSH connection to exchange stay-alive pings every thirty seconds.

If your repository is too large for a single network pull. I would work around it by running a shallow clone command like "git clone --depth 1 ..."

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events