You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
$ git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
fatal: Out of memory, malloc failed (tried to allocate 4168062027 bytes)
fatal: sha1 file '<stdout>' write error: Broken pipe
error: remote unpack failed: unpack-objects abnormal exit
I am trying to push *.sql which is around 4Gb.
Can you help me get over this issue? Is there any limitation on the file size in the repository?
Hi @Mangesh Chougule ,
Thank you for taking the time and provide us with a bit more of context on the problem you are facing.
The suggestion will be the same as previous mentioned, however, I will be providing you with more explanation as to why you should follow the suggested.
You are attempting on pushing a file (3.8Gb in size) to a repository. If you are not using Git LFS, whenever user or CI tool that will pull from this repository will subsequently request that 3.8Gb SQL file. This will cause a great load on your Bitbucket DataCenter when "git-upload-pack" gets issued on the server and all of this could be avoid if you push larger files using Git LFS.
As pointed out ( https://www.atlassian.com/git/tutorials/git-lfs ) Git clients will be able to fetch/pull from your repository and only when needed they would be issuing a Git LFS command to retrieve those larger files.
On top of that, if not only your Git client but also the Git version installed and used by Bitbucket DataCenter is 2.18.0 or above, you can benefit from SSH Protocol v2 (this feature became available on Bitbucket v5.13 or above - Bitbucket Server 5.13 release notes).
It is best practises and recommended using SSH over HTTP(S) protocol when working with larger repositories, because the SSH protocol is much more reliable and it is meant for this purpose. Please, review Using SSH keys to secure Git operations documentation as it provides you with necessary information as:
Just as a reminder, the size of your repository should be given by the instructions provided on Git Repository Size from the Command Line. The command "du -hs" does not actually give the size of a repository.
If SSH is not an option, then you should be reviewing:
Thanks for the response.
Im trying to push 3.8 GB file to a git server from my windows mahine using git bash.
1. git version 2.23.0.windows.1
2. Windows - 64 bit
3.Ram = 16gb
4. $ du -hs >> 4.7G
5. Data centre- GIT server is hosted.
6. What is the protocol you are using (HTTP(S) or SSH)?