Malloc Failed in Git Clone

时间秒杀一切 提交于 2019-12-23 03:25:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!