-1

Problem:

When trying to push to a GitHub repository I get the following errors:

error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
fatal: the remote end hung up unexpectedly

note the (err 8) component of this message.

Context

Background

I have a private repository on GitHub, which I and collaborators have cloned, pulled and pushed to successfully in the past. We use a combination of Rstudio and shell for interacting with git.

Just yesterday, one of my collaborators noted they couldn't push but attributed it to their institution's firewalls/proxies. However, now I am unable to push to the repository coming from an independent internet connection (see error above).

The largest file in this repository is ~35MB and has previously been pulled/pushed without problem.

Other stackoverflow examples

I have done my googling and refer to these relevant problems and solutions from stackoverflow:

Attempted Solutions

The first proposed solution I tried was to increase the http buffer:

git config --global http.postBuffer 157286400

This takes a long time to attempt, and again returns the same error as above. Furthermore, see why this solution probably isn't a good one for any situation from the git documentation itself: external link to git FAQ.

I think that in this situation the connection was dropped mid transfer, but due to the files being sent without chunking, the failure wasn't reported until after the attempt to write all changes had complete.

The second proposed solution was to drop down to a lower http version:

git config --global --unset http.postBuffer
git config --global http.version HTTP/1.1

This returned a new error with a different .

The third option I tried was to combine the two proposed solutions:

git config --global http.version HTTP/1.1
git config --global http.postBuffer 157286400

This also takes a long time to attempt (like increasing buffer alone) and also returns the new error (from downgrading the http.version alone).

Initial Situation

I'm now at a bit of a loss about what to do. I've seen some comments that creating a new branch, blowing away the original master and assigning the new branch as master might work, but I'm hesitant to try this as I don't want to loose version control with the previous commits (which is what one commenter said would happen).

Any new solutions?

1 Answers1

-1

Final Situation - Resolved

While writing all of this out, it appears I've found the solution, however, I thought I would post it anyway.

In short: I had committed large files a few commits earlier. While these were subsequently added to .gitignore, they were still in the repo history. Because they were added a few commits earlier, and I was primarily using the Rstudio interface for git, I didn't see the specific errors about the large files during the latest push attempts.

Here are the resources for solving this issue: