I will be honest, I know very little about the internals of git.
I have staged and commit a 40mb directory, but when I come to push...
$ git push --v
This is a bug in Git; when using HTTPS it will use chunked encoding for uploads above a certain size. Those do not work.
A trivial fix is to tell git to not chunk until some ridiculously large size value, such as:
git config http.postBuffer 524288000
Probably your credentials. Use the git+ssh protocol instead of https.
If you found this site because of BitBucket failing with that error message, then check out the answers to this one:
Particularly the comment by Nicholas Pickering and Simon Tewsi about exactly what part of the key needs to be pasted into the BitBucket dialog.
Using SourceTree to push to BitBucket I get this error once every few months. It turns out that I just have to wait an extra five minutes and it sorts itself out. It looks like it has hanged and the temptation is to just cancel and try again but maybe hang in there a bit longer. I know that this is answered already but my commits amounted to maybe a couple of hundred kb rather than the 40mb the original poster is talking about.
With Git 2.13 (Q2 2017), you will be able to set http.postBuffer
to a really large number (i.e, larger than ulong
on some platforms).
See commit 37ee680 (11 Apr 2017) by David Turner (csusbdt).
(Merged by Junio C Hamano -- gitster -- in commit 4c01f67, 24 Apr 2017)
http.postbuffer
: allow full range ofssize_t
valuesUnfortunately, in order to push some large repos where a server does not support chunked encoding, the
http postbuffer
must sometimes exceed two gigabytes.
On a 64-bit system, this is OK: we just malloc a larger buffer.This means that we need to use CURLOPT_POSTFIELDSIZE_LARGE to set the buffer size.