3

I'm trying to git push a small project (712kb not taking into account the .git folder) to a new repo, hosted on Google Source Repositories, and the push never finishes. It stops right after printing the Total message (hangs for at least hours).

Enumerating objects: 77, done.
Counting objects: 100% (77/77), done.
Delta compression using up to 8 threads
Compressing objects: 100% (71/71), done.
Writing objects: 100% (77/77), 131.62 KiB | 6.93 MiB/s, done.
Total 77 (delta 12), reused 0 (delta 0)

The only workaround was to split the commit into two smaller commits (no specific files need to be separated into the second commit; any random files do the trick). This confirms that it's not an auth issue. But it's not a real solution.

None of the answers I've found fix the issue. I'm mainly referring to :

I'm looking for other ideas to identify a proper solution to this issue.

nfonrose
  • 43
  • 1
  • 8
  • The fact that it printed the total+delta+reused numbers means that as far as *Git* was concerned, it was done. Why the https remote started to spin is a different question and will require debugging the https remote code and/or the receiver on the Google side (this may get tricky!). – torek Jan 05 '22 at 19:37
  • Changing the size of the `http.postBuffer` to a smaller size fixed the issue. Maybe this buffer size is used by `git-remote-https` which is why it solved the issue – nfonrose Jan 06 '22 at 09:24
  • 1
    If you have a reliable reproducer (a repository or setup instructions you can share), send it to the Git mailing list (git@vger.kernel.org) and someone will look into it. – torek Jan 06 '22 at 18:56

1 Answers1

10

Maybe you could try to lower the size of http.postBuffer instead of increasing it. I remember it did the trick for me when I faced the same problem

MatthieuGD
  • 4,552
  • 2
  • 30
  • 29
  • 5
    Thanks Matthieu, this actually worked! A `git config http.postBuffer 16384` fixed the push issue. The push has completed in a few seconds. **I double checked** and set the postBuffer to a larger value again (1Mb) and it failed again. If someone knows why, I'd be interested in understanding more. Could this be related to Google Source Repositories (vs Github where people seem to have solved the problem by *increasing* the size of this buffer)? – nfonrose Jan 06 '22 at 09:20
  • 1
    This worked for me again, trying to push to another git server (GitLab CE instance). So this has nothing to do with Google Source Repositories. When I had the initial problem, it was on another Mac (an M1 Mac) and this time it's on a 2015 MBP. So maybe it's related to my (ADSL) connection? – nfonrose Feb 18 '22 at 15:42