4

For the past couple of days, I have been attempting to push existing repos towards a locally hosted git server (hosted on an http site) to which I was able to push to in the past. However, I am now unable to do so with the following error.

git push Enumerating objects: 9, done. Counting objects: 100% (9/9), done. Delta compression using up to 8 threads Compressing objects: 100% (4/4), done. Writing objects: 100% (5/5), 534 bytes | 267.00 KiB/s, done. Total 5 (delta 3), reused 0 (delta 0), pack-reused 0 error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500 send-pack: unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly Everything up-to-date 

Furthermore, this error only happens to my account. My colleague is currently able to push without any issues. I am also able to execute most other commands including clone and fetch commands.

This error happens whether I push:

  • A commit with a single byte of data modified.
  • A commit with a large amount of data modified.
  • Multiple commits.
  • A commit within a fresh repo.

Things I have tried unsuccesfully:

  1. Hossein Kurd's answer which gave little to no helpful information.
set GIT_TRACE_PACKET=1 set GIT_TRACE=1 set GIT_CURL_VERBOSE=1 

Followed by:

git config --global core.compression 0 git clone --depth 1 <repo_URI> # cd to your newly created directory git fetch --unshallow git pull --all 
  1. Codemaker's answer
git config --global http.postBuffer 157286400 
  1. Checked the remote to make sure it was valid
git remote -v 
  1. DobbyTheElf and TOPKAT's answer by verifying that I still have over 200 Gb of storage left on the server and by executing the following:
git gc git fsck 
3
  • 2
    You need to look at the logs of the server, since you're getting a 500. For Apache, this is typically the error.log file. You should not use http.postBuffer. Commented Jan 12, 2022 at 22:44
  • I have posted a solution which is present at stackoverflow.com/a/78814683/13127848 Commented Aug 1, 2024 at 14:42
  • I am also getting this same error while pushing to GitHub repo from MacOS 13.x. Similar to yours I am able to clone & fetch. tried both ssh & http smart protocol; same error in both cases. To no avail, tried mentioned troubleshooting and tried both Apple git & latest one from Homebrew Commented Dec 30, 2024 at 14:35

4 Answers 4

2

I tried all the above and nothing worked. It turned out I had a whole bunch of .sbar files (200Mb+, Substance painter, substances). Once I tracked them as git LFS everything worked.

It looks like I was hitting the max file size limit on GitHub.

Sign up to request clarification or add additional context in comments.

Comments

2

I had the same issue. Updating buffer size solved my problem.

git config http.postBuffer 524288000 

Please refer to this answer

2 Comments

+1, fixed for me after I updated this buffer and switched to latest git in Homebrew (in Apple git v 2.39, it didn't worked).
Interestingly just after switching branch, the original error came back. Tried to increase the buffer size to no avail..
0

For me it was issue with connection with GitHub.com I was intermittently getting network access issue with GitHub.com

After adding the IP address for GitHub.com in /etc/hosts it started working.

Refer this blog to setup the same: Can't access to Github's website on MacBook

1 Comment

I don't see how adding GitHub to the hosts file is in any way a solution to a problem with a local Git server.
0
git config --global http.version HTTP/1.1 

Try this solutions, Hope you get the solution!

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.