zoukankan      html  css  js  c++  java
  • error: index-pack died of signal fatal: index-pack failed【Git】

    error: index-pack died of signal fatal: index-pack failed

    环境:

    克隆Linux源码时发生错误
    git clone https://github.com/torvalds/linux.git

    error: index-pack died of signal fatal: index-pack failed

    google云Compute Engine
    Memory: 0.6GB内存
    Linux版本: Debian GNU/Linux 9.5 (stretch)

    错误原因

    结合网上的博客、以及StackOverFlow的回答,问题原因应该是计算机内不足导致的

    解决方法

    1.--depth 1 只clone 最近一次的提交

    #!/bin/bash
    git config --global core.compression 0
    
    git clone --depth 1 <repo_URI>
    
    git fetch --unshallow
    
    git pull --all
    

    2.配置~/.gitconfig

    gitconfig --global pack.threads 1
    
    gitconfig --global pack.deltaCacheSize = 128m 
    git config --globalpack.windowMemory 1024m
    

    这样一来,应该是可以减小资源的占用,但对于大的git还是无济于事。

    3.配置交换空间
    原理显而易见,通过提高系统内存,完成大git仓库的clone操作。

  • 相关阅读:
    新的起点,虽半步即天涯
    自定义函数
    冒泡排序 数字去重
    for 循环练习题
    for 循环练习题(2)
    for 循环 乘法口诀表
    js基础标签用法
    网页格式布局 流式布局
    样式表属性
    框架
  • 原文地址:https://www.cnblogs.com/shengwang/p/9993897.html
Copyright © 2011-2022 走看看