1

Hi I have an issue with GitHub when pushing. It started happening two days ago or so and I can't figure it out.

When pushing from terminal I get:

Counting objects: 358, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (322/322), done.
error: RPC failed; result=56, HTTP code = 200 15.52 MiB/s   
fatal: The remote end hung up unexpectedly
Writing objects: 100% (358/358), 157.16 MiB | 16.00 KiB/s, done.
Total 358 (delta 230), reused 3 (delta 3)
fatal: The remote end hung up unexpectedly
Everything up-to-date

Before throwing the fatal error it hangs for good three minutes. It says everything is up to date but evidently the changes aren't saved to github. I've pushed the same repository to bitbucket without any problems. I suspect it's some sort of timeout.

This is how my .git/config looks like.

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = false
    precomposeunicode = true
[branch "master"]
[remote "origin"]
        url = https://github.com/****/****.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[remote "bitbucket"]
        url = https://***@bitbucket.org/****/***.git
        fetch = +refs/heads/*:refs/remotes/bitbucket/*

I've also tried to sync with the github app and it takes pretty long until it throws a "Network Error. Check your Internet connection and try again."

Thanks in advance.

yafrack
  • 654
  • 1
  • 8
  • 24
  • Does http://stackoverflow.com/a/22005335/6309 or any of its comments would help? Or http://stackoverflow.com/a/29557970/6309 – VonC Aug 16 '15 at 08:43
  • I already tried the suggested config setting (because I saw it in several SO) but didn't have any luck. – yafrack Aug 16 '15 at 09:09
  • Did you try the comments (like "disabling the Kaspersky AV NDIS 6 Filter" or the equivalent in your anti-virus)? Or the other suggestions in http://stackoverflow.com/a/29557970/6309? – VonC Aug 16 '15 at 09:10
  • I don't have any firewall on my mac to my knowledge. What's weird is that bitbucket and heroku works without a problem. – yafrack Aug 16 '15 at 09:44
  • Any more clue with a `do GIT_CURL_VERBOSE=1 git push`? What git version are you using? – VonC Aug 16 '15 at 09:58
  • git version 2.3.2 (Apple Git-55). I tried doing it in verbose but it didn't help me much. In the beginning it says * Couldn't find host github.com in the .netrc file; using defaults * Trying 192.30.252.130... * Connected to github.com (192.30.252.130) port 443 (#0) so it looks it ends up connecting somehow. I can post all the output in the main thread if it helps – yafrack Aug 16 '15 at 10:03

1 Answers1

1

This knowledge base page do mention:

Cause

Error code 56 indicates a curl receive error of CURLE_RECV_ERROR which means there was some issue that prevented the data from being received during the clone process.
Typically this is caused by a network setting, firewall, VPN client, or anti-virus that is terminating the connection before all data has been transferred.

Temporarily disable any firewall or anti-virus software and attempt the clone again.

Diagnosis

To turn on Git debug logging, before pushing using the command line, proceed like this for different OS:

On Linux
Execute the following in the command line before executing the Git command:

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

On Windows
Execute the following in the command line before executing the Git command:

set GIT_TRACE_PACKET=1
set GIT_TRACE=1
set GIT_CURL_VERBOSE=1

Workaround

If the usual recommendations (like git config --global http.postBuffer 2M) fail:
Switch to ssh (after generating ssh keys):

git remote set-url orgin git@github.com:username/repo
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • You mention the error should be caused in the clone process but I'm indeed trying to push, not clone. Does this apply anyway? Thanks for the detailed answer – yafrack Aug 16 '15 at 14:00
  • @marc yes, in both cases, clone or push, curl is involved. – VonC Aug 16 '15 at 14:02
  • I tried the ssl and still get the error. Write failed: Broken pipe6/375), 53.94 MiB | 45.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@github.com:***/***.git' – yafrack Aug 16 '15 at 14:18
  • @marc then that means the *content* you are trying to push is not supported. Probably because you have a commit too big. Try https://rtyley.github.io/bfg-repo-cleaner/ – VonC Aug 16 '15 at 14:19
  • Yeah I have some bins that are bigger than they should. I removed them but it's still complaining. I tried the cleaner but it didn't help. – yafrack Aug 16 '15 at 16:17
  • @marc after the BFG, can you try http://stackoverflow.com/a/31980224/6309? (before trying to push again) – VonC Aug 16 '15 at 16:18