git push with ssh causes remote end to hang up

Issue #6406 resolved
Young Zhang
created an issue

Basically, I'm doing this on OSX

$ git --version git version 1.7.9.6 (Apple Git-31.1)

$ git push -u origin --all Warning: Permanently added the RSA host key for IP address '207.223.240.181' to the list of known hosts. Counting objects: 14912, done. Delta compression using up to 8 threads. Compressing objects: 100% (4259/4259), done. Write failed: Broken pipe25/14912), 6.64 MiB | 88 KiB/s
fatal: The remote end hung up unexpectedly error: pack-objects died of signal 13 error: failed to push some refs to 'ssh://git@bitbucket.org/yzhang/reponame.git'

Comments (26)

  1. Brian Nguyen

    Hi,

    We had some stability issues over the weekend, that may have affected cloning and pushing.

    If you try again, are you still seeing this problem? Does this occur for all of your repositories?

    Can you also try running and copy the output to this issue?

    git push -u origin --all --verbose
    

    Cheers, Brian

  2. Erik van Zijst staff

    We found a faulty SSH daemon that we killed, which I suspect has been the cause for these issues.

    Please reopen this issue if you still see the problem going forward.

  3. AppEatite

    The results of the above command you posted is the following

    MacBook-Pro:Mainrepo.git username$ git push -u origin --all --verbose Pushing to ssh://git@bitbucket.org/NAMEOFGIT.git Counting objects: 600, done. Delta compression using up to 8 threads. Compressing objects: 100% (567/567), done. Received disconnect from 207.223.240.181: 2: Packet corrupt fatal: The remote end hung up unexpectedly error: pack-objects died of signal 13 error: failed to push some refs to 'ssh://git@bitbucket.org/NAMEOFGIT.git'

  4. AppEatite

    I tried starting from a fresh repo and pushing changes and was unsuccessful there too. Following are the results

    user-64-9-235-121:.git username$ git push -u origin master Counting objects: 865, done. Delta compression using up to 8 threads. Compressing objects: 100% (856/856), done. Received disconnect from 207.223.240.182: 2: Packet corrupt fatal: The remote end hung up unexpectedly error: pack-objects died of signal 13 error: failed to push some refs to 'ssh://git@bitbucket.org/NameOfREpo.git'

    Help please

  5. Carsten Carsten

    I have the same problem - git push is stalling out on large files:

    $ git push Counting objects: 3755, done. Delta compression using up to 8 threads. Compressing objects: 100% (3708/3708), done. Writing objects: 9% (334/3708) <- this never ends

    environment is windows/Git-1.8.3-preview20130601.exe.

    Searching the internet - it looks more that a missconfigured sshd is on your side. Please check!

  6. Roberto Pompermaier

    Hi i've the same issue.

    I'm trying to push many file and some of that are more than 300-400 mb.

    Here my output.... git push -u origin master Counting objects: 45287, done. Delta compression using up to 8 threads. Compressing objects: 100% (43600/43600), done. Write failed: Broken pipe45287)
    fatal: The remote end hung up unexpectedly error: pack-objects died of signal 13 error: failed to push some refs to 'ssh://git@bitbucket.org/robypomper/johnny.git'

  7. anastasiia lytvyn

    I use linux mint 17 and had this issue

    git push origin rborntest

    Counting objects: 104, done. Delta compression using up to 2 threads. Compressing objects: 100% (83/83), done. Write failed: Broken pipe/104), 3.53 MiB | 3.00 KiB/s
    fatal: The remote end hung up unexpectedly error: pack-objects died of signal 13 error: failed to push some refs to 'git@bitbucket.org:rborn/testanastasiia.git'

  8. Dmitry Ivashenko

    I found stupid solution =)

    Step 1 #

    I have a big project and I can't push my initial commit by command "git push -u origin --all", because it very long operation - pushing break in ~50% of progress.

    So, I replace this command by simple 'git push origin master'. Now pushing progress become shortly, but it also break at ~95% of "Writing objects" stage. We need to keep ssh-connection alive for all time of pushing...

    Step 2

    I modify my ~/.ssh/config:

    Host *
      TCPKeepAlive yes
      ServerAliveInterval 600
      ServerAliveCountMax 5
    

    Now pushing progress break in ~98%. It looks like this setting doesn't have effect without same server configuration =(

    Step 3 (magic)

    I found one way how to keeping connection manually (literally =). While git performs the pushing process, we should to quickly and many times press the 'Enter' key in terminal. In my case, console output looks like this:

    ...
    Writing objects:  98% (11799/11992), 61.39 MiB | 4.12 MiB/s 
    Writing objects:  99% (11873/11992), 61.39 MiB | 4.12 MiB/s   
    Writing objects:  99% (11988/11992), 65.59 MiB | 4.32 MiB/s   
    Writing objects: 100% (11992/11992), 67.91 MiB | 4.25 MiB/s, done.
    Total 11992 (delta 3183), reused 0 (delta 0)
    To bitbucket.org:....git
     * [new branch]      master -> master
    

    I think this stupid manipulations may refresh ssh connection and prevents timeout expiration)) (sorry for bad english)

  9. William Chang

    I'm having this or a similar issue. Pushing via ssh and ssh key. My commit isn't big. Nor do I get the signal 13.

    OSX Yosemite, iTerm2, git version 2.5.4 (Apple Git-61)

    Warning: remote port forwarding failed for listen port 52698
    Counting objects: 4, done.
    Delta compression using up to 8 threads.
    Compressing objects: 100% (4/4), done.
    Writing objects: 100% (4/4), 1.62 MiB | 0 bytes/s, done.
    Total 4 (delta 3), reused 1 (delta 0)
    Write failed: Broken pipe
    fatal: The remote end hung up unexpectedly
    fatal: The remote end hung up unexpectedly
    

    My ~/.ssh/config:

    RemoteForward 52698 127.0.0.1:52698
    Host * 
      TCPKeepAlive yes
      ServerAliveInterval 10
      ServerAliveCountMax 5
    

    and my .git/config has

    [http]
        postBuffer = 524288000
    

    though as I understand it this shouldn't matter for ssh.

    No luck with any of Dmitry's methods above, sadly.

  10. William Chang

    @robco

    No, I can delete the RemoteForward 52698 127.0.0.1:52698 line from ~/.ssh/config and still the same:

    Counting objects: 4, done.
    Delta compression using up to 8 threads.
    Compressing objects: 100% (4/4), done.
    Writing objects: 100% (4/4), 1.62 MiB | 0 bytes/s, done.
    Total 4 (delta 3), reused 1 (delta 0)
    Write failed: Broken pipe
    fatal: The remote end hung up unexpectedly
    fatal: The remote end hung up unexpectedly
    
  11. William Chang

    @robco

    OSX hasn't reported any ip conflicts.

    Also, push via ssh succeeds if I remove a 6.3Mb html file from the commit and keep only smaller source files. So I assume this has to do with larger files somehow.

  12. William Chang

    @robco

    No IP conflicts:

    $ sudo /usr/local/sbin/arping -D -I en0 -c 2 <my_IP>
    ..  100% packet loss (0 extra)
    $ echo $?
    1
    

    I overwrote the html file with a small text file (5 bytes) and surprisingly it wouldn't push. I git update-index --assume-unchanged the html file (which is still really the 5 byte text file) and it pushed. So it is not the size of the file, but something about the specific file perhaps?

    ETA: I overwrote the html file with the text file, successfully pushed, then replaced the real html file, now when I try to push I get signal 13:

    Counting objects: 4, done.
    Delta compression using up to 8 threads.
    Compressing objects: 100% (4/4), done.
    Write failed: Broken pipe4)
    fatal: The remote end hung up unexpectedly
    error: pack-objects died of signal 13
    error: failed to push some refs to 'ssh://<etcetc>'
    
  13. robco

    @William Chang that is indeed strange. anything weird about the permissions of the file? without digging around in your box, I'm out of ideas. have you tried deleting .git and trying again? that's the last suggestion I can come up with.

    edit: anything weird about the file name?

  14. William Chang

    @robco

    See edit above: I'm now getting signal 13. I tried changing the file name using git mv, same error. The file name is pretty innocuous, basically foo_bar.html. I've also successfully pushed this file any number of times using https before recent network changes at my workplace.

  15. Log in to comment