1. 程式人生 > >推送GitHub報錯 fatal: Out of memory, malloc failed 解決辦法

推送GitHub報錯 fatal: Out of memory, malloc failed 解決辦法

倉庫 span .com 報錯 nbsp locate memory img 遠程

現象:

推送GitHub時,出現如下報錯

fatal: Out of memory, malloc failed (tried to allocate XXXXXX bytes)
error: failed to push some refs to ‘https://github.com/xxxxxxx/xx.git‘

技術分享圖片

解決方法:

修改配置文件(.git/config)中遠程GitHub的url為SSH形式,而不是HTTPS格式

SSH:[email protected]:用戶名/倉庫名.git

技術分享圖片

修改後正常,如下:

技術分享圖片

原因:

未知

推送GitHub報錯 fatal: Out of memory, malloc failed 解決辦法