Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Connection to closed by remote host.

hi, get error when git push with ssh.

ssh -T is OK.

git remote -v is OK.

what is wrong?


following, shell trace when git push:

git push --progress -v A B

Pushing to
Counting objects: 31, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (17/17), done.
Writing objects: 100% (31/31), 4.73 KiB | 0 bytes/s, done.
Total 31 (delta 3), reused 0 (delta 0)
Connection to closed by remote host.
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

1 answer

0 votes

Hi Seiji,  

The message "The Remote End Hung Up Unexpectedly" would indicate a timeout occurred, most likely in one of the components of the network.

Can you check the network components involved on your end?


Running the same command with the additional logging enabled will provide more details on the exact issue. Can you try running this?

GIT_TRACE=1 GIT_CURL_VERBOSE=1 GIT_SSH_COMMAND="ssh -vvv" git push --progress -v A B


Thanks, Caterina - Atlassian 

GIT_CURL_VERBOSE=1 GIT_SSH_COMMAND="ssh -vvv" git clone A

trace: built-in: git 'clone' 'A'

Cloning into 'A'...

trace: run_command: 'ssh' '' 'git-upload-pack '\''A'\'''

trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 345 on git2consul4nodeagents-58c46cfbc4-xvw8d'

trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 345 on git2consul4nodeagents-58c46cfbc4-xvw8d'

trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 345 on git2consul4nodeagents-58c46cfbc4-xvw8d'

remote: Counting objects: 14094, done.

remote: Compressing objects: 100% (4531/4531), done.

packet_write_wait: Connection to port 22: Broken pipe 

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

You probably have large files. I've removed my large files but I am still having the same issue.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,849 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you