I have been following the tutorial on the Raspberry Pi website for Getting Started with Git. I created a Git repository on my Raspberry Pi B. I also created a GitHub account. This all went well.

I then tried to upload the repository to GitHub (using HTTP). I did "Create Repository" on GitHub and followed their instructions for setting remote origin and pushing the repository. At first, I had an authentication problem, but I solved this (problem with my Raspberry Pi clock). However, I then got an error saying

Out of memory: malloc failed. Tried to allocate 524288000 bytes.

I didn't think my repository would be that huge. There were a few Python files, none of them very long, and a README.

I'm wondering if the Raspberry Pi B just doesn't have enough memory to push Git repositories, but you'd think the Git tutorial on the Raspberry Pi website would mention if this was the case.

Does anyone know if it's possible to fix this error and push Git repositories to GitHub from the Raspberry Pi?

P.S. While trying to solve the earlier HTTP request failed, I followed a suggestion to set the postBuffer to 524288000 bytes. It didn't work, and the problem eventually turned out to be to do with the clock, but I'm wondering if the two could be connected since the numbers are the same?

  • Check this url: stackoverflow.com/questions/8855317/…
    – MatsK
    Aug 21 '17 at 20:46
  • @MatsK, I checked the question you linked to before posting this one, as I still wasn't sure what to do. The top answer mentions downloading the latest version of Git, but I only installed it two days ago so I expect I have the latest version already. I have no images, PDFs or videos, so I don't expect any of my files will be all that big. They also suggested using a machine with more RAM, but the tutorial said Git would work on Pi--is that only on more recent models? I will try the pack config, prune and repack commands they mentioned and see if it works, though. Aug 22 '17 at 15:19
  • I was more thinking in the line of configuring that limit memory usage that was mentioned in the link.
    – MatsK
    Aug 22 '17 at 15:29
  • @MatsK Yes, I'll try that. Aug 22 '17 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.