How to Solve Git error: out of memory

Question

No matter pull, clone or push, errors are reported

fatal: Out of memory, malloc failed (tried to allocate 301989888 bytes)
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Solution:

git config --global http.postBuffer 524288000
git config --global core.compression -1

Read More: