I've been having problems pushing to my Bitbucket repo that seemed related to file size. I tried repeatedly overwriting a dummy file foo.txt
with gtruncate -s <file_size> foo.txt
(I'm on OSX) with progressively bigger file sizes, commiting and pushing. It seems that if the total size of the git objects written is > 20Kb, the push fails. Sample outputs:
Writing objects: 100% (3/3), 10.23 KiB | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To [email protected]:wkc1986/myrepo.git
1678ffd..e821280 master -> master
Writing objects: 100% (3/3), 15.20 KiB | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To [email protected]:wkc1986/myrepo.git
b59c4dd..4da53c7 master -> master
Writing objects: 100% (3/3), 18.19 KiB | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To [email protected]:wkc1986/myrepo.git
925ff96..7aa9383 master -> master
Writing objects: 100% (3/3), 19.18 KiB | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
To [email protected]:wkc1986/myrepo.git
63c6d43..fac8697 master -> master
Writing objects: 100% (3/3), 20.17 KiB | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
Write failed: Broken pipe
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
This is really problematic as I can't predict the size of the git objects from the current file size. I have tried editing my ~/.ssh/config
but that doesn't seem to help:
Host *
TCPKeepAlive yes
ServerAliveInterval 5
ServerAliveCountMax 5