问题
Using Git version 2.19.1.windows.1 on Windows 7 64 bit.
I am trying to run in D:/Users/Della/Documents/Python_Scripts/
git clone https://gitlab.com/forkingpin/dui-dashboard.git
on the git bash. The repository contains only a 59 bytes ReadMe so far. The error message I am getting reads
fatal: Out of memory, malloc failed (tried to allocate 1744830464 bytes)
fatal: not a git repository: 'D:/Users/Della/Documents/Python_Scripts/
What is the way out?
Points to note.
- The same command is working like a charm on my Linux Desktop
I had a similar issue while pushing the committed changes (on windows) in another repository. I corrected that by appending .git/config with
[http] postbuffer = 5m
But that was for an existing repository. I cannot have the config file before I clone it.
回答1:
Try if the same command works in a regular CMD (not git bash), where you have set a simplified PATH first:
set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%
cd D:\Users\Della\Documents\Python_Scripts
git clone https://gitlab.com/forkingpin/dui-dashboard.git
cd dui-dashboard
dir
来源:https://stackoverflow.com/questions/53699518/malloc-failed-in-git-clone