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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,553,173
Community Members
 
Community Events
184
Community Groups

Connection to bitbucket.org closed by remote host.

hi, get error when git push with ssh.

ssh -T git@bitbucket.org is OK.

git remote -v is OK.

what is wrong?

 

following, shell trace when git push:

git push --progress -v A B

Pushing to git@bitbucket.org:username/project.git
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 bitbucket.org closed by remote host.
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly

2 answers

Today I bumped into the exact same problem -- 

 

ssh -T git@bitbucket.org is OK.

git remote -v is OK, and even git clone & push an empty repo OK!

yet, error when git push with ssh.

 

Found a similar report at:

https://bitbucket-users.narkive.com/j1fM2nR3/cannot-push-to-bitbucket

 

I have pushed my repository to bitbucket master thousands of times.
Today for some reason I cannot push several commits to bitbucket.

 

and a related one at:

https://stackoverflow.com/questions/6842687/the-remote-end-hung-up-unexpectedly-while-git-cloning

from which I've tried every single "working solution" in all the answers. But nothing worked.

And moreover, my git repo is only 1.5M in size, even including all the histories.

 

Now, 6 hours later, I did a git push again, and it worked without a hitch (at 1.13 MiB/s and my machine can do 9M/s download without a fuss), and I haven't changed a thing since.

 

So I'd say it is the bitbucket.org git server was stressed when I was doing my push, and the "working solution" like the following,

"Tried all the solution posted here, but this one solution only worked!"

is nothing but the server stress happened to be over.

 

BTW, here is the `GIT_TRACE=1 GIT_CURL_VERBOSE=1 GIT_SSH_COMMAND="ssh -vvv" git push --progress -v` log:

 

. . .
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 2097152 rmax 32768
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: exec request accepted on channel 0
debug3: send packet: type 1
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i0/0 o0/0 e[write]/0 fd 4/5/6 sock -1 cc -1)

debug1: fd 0 clearing O_NONBLOCK
debug3: fd 1 is not O_NONBLOCK
Connection to bitbucket.org closed by remote host.
Transferred: sent 2800, received 1956 bytes, in 59.3 seconds
Bytes per second: sent 47.2, received 33.0
debug1: Exit status -1
fatal: Could not read from remote repository.

 

0 votes
Caterina _or Kate_ Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 03, 2018

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@bitbucket.org' '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 18.205.93.2 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
TAGS
AUG Leaders

Atlassian Community Events