2

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
  • 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`](https://git-scm.com/docs/gitfaq#http-postbuffer). – bk2204 Jan 12 '22 at 22:44

2 Answers2

0

My company has a policy where we need to change our passwords every year. So at the beginning of the year, I changed my password.

However, our git accounts are associated with our Microsoft accounts so changing my password should've changed my git password in my mind. But it did not.

Therefore, I had to go into my Credentials Manager in order to remove my previously existing git credentials.

  • Go to Credential Manager

    • in German, it is called: Anmeldeinformationsverwaltung
    • in French, it is called: Gestionnaire d'identification
    • in Polish, it is called: Menedżer poświadczeń
    • in Portuguese, it is called: Gerenciador de Credenciais
    • in Russian, it is called: Диспетчер учётных данных
    • in Spanish, it is called: Administrador de credenciales
  • Go to Windows Credentials.

  • Delete the entries under Generic Credentials labeled as git. Windows stores quite a variety of credentials in here so don't modify any that you are unwilling to lose.

Then push once and re-enter my new (valid) credentials and all is now functional.

0

This is a very unsatisfactory follow-up, but may be helpful to posterity...
I encountered the same error as OP (also on Windows), but simply deleting saved credential as above did not resolve it for me.
But then I logged out of Github and back in, and, voila, the next git push worked!

I observe that Github announced beta support for passkeys recently and I had not pushed anything since then. I didn't sign up for the beta or make any other change on Github, but post hoc, ergo propter hoc?

BobHy
  • 1,575
  • 10
  • 23