青龙面板拉库的时候遇到一个问题,刚开始以为是代理问题,遂自己从 cloudfare 建个加速站,但是还是不行,从网上也找了很多加速代理,都没能成功拉下来。
然后想着不然直接【曲线救国】吧,就不用 github 拉了,直接 clone 到 gitee 上面拉
结果。。。
报了如下的错误

开始拉取仓库 mrabit_aliyundriveDailyCheck 到 /ql/data/repo/mrabit_aliyundriveDailyCheck

Cloning into '/ql/data/repo/mrabit_aliyundriveDailyCheck'...

fatal: Out of memory, malloc failed (tried to allocate 524288000 bytes)

fatal: Could not read from remote repository.

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

拉取 mrabit_aliyundriveDailyCheck 失败,请检查网络...

目前还是不清楚啥原因


用了这个代码之后貌似可以了

git config --global --unset http.postbuffer

好像是因为内存限制的原因。然后就在终端用了这个命令,不再报错了。


关于 http.postbuffer的问题

  • 将其提高到默认值以上可能会增加较大推送的延迟(因为客户端会将 HTTP 请求缓冲为较大的区块)。
  • 如果将其设置为大于 HTTP 服务器的 HTTP 区块大小限制(例如 TFS 服务器的web.config中的maxAllowedContentLengthmaxRequestLength),则大于区块大小限制的所有推送都将开始失败。

如果已经设置了http.postbuffer,怎么取消呢?
若要检查是否已设置,请运行:

git config --show-origin --get-all http.postBuffer

可能需要在全局 .gitconfig 文件中取消设置:

git config --global --unset http.postBuffer

以及在存储库级别 .git/config(替代全局设置)中取消设置:

git config --local --unset http.postBuffer

当然,最后还是用了 gitee 来进行拉库,正好 gitee 可以自动 pull github的仓库镜像。
pull github.png

最后修改:2024 年 01 月 20 日
如果觉得我的文章对你有用,请随意赞赏