Git pull失败,包头错误

Git pull失败,包头错误,git,Git,git pull失败,出现以下错误 remote: Counting objects: 146, done. remote: fatal: unable to create thread: Resource temporarily unavailable error: git upload-pack: git-pack-objects died with error. fatal: git upload-pack: aborting due to possible repository corr

git pull失败,出现以下错误

remote: Counting objects: 146, done.
remote: fatal: unable to create thread: Resource temporarily unavailable
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header

你知道如何成功拉车吗

remote
开头的行是从远程系统上运行的git输出的。错误:

fatal: unable to create thread: Resource temporarily unavailable
。。。强烈建议您的服务器内存不足,如果您有以下情况之一,则可能会发生这种情况:

  • 包含大量大型文件的存储库,这可能会导致重新打包占用大量内存
  • 有限的虚拟内存-一般情况下,或由于
    ulimit
    设置,仅针对该帐户
  • 建议通过登录远程系统(作为git运行的用户)并执行以下操作来限制打包可能占用的内存量:

    git config --global pack.windowMemory "100m"
    git config --global pack.packSizeLimit "100m"
    git config --global pack.threads "1" 
    

    警告:如果您在Git 2.19.1中看到此错误,这是意料之中的,并记录在:“
    Git gc
    在计数对象的33%时崩溃”(这报告了
    Git gc
    ,也报告了
    Git pull
    )的APPCRASH),因为“Git pack对象”中使用的互斥锁未正确初始化并导致该错误“
    git-repack
    ”以在Windows上转储内核

    如本期所述:

    它影响的不仅仅是
    gc
    。我还用
    pull
    点击了它的一个变体:

    $ git pull
    remote: Enumerating objects: 3548, done.
    error: git upload-pack: git-pack-objects died with error.
    fatremote: aborting due to possible repository corruption on the remote side.
    al: git uploadf-pack: aborting due to possible repository corruption on the remote side.
    atal: protocol error: bad pack header
    
    这在Git 2.20(2018年第4季度)中已固定。
    参见(2018年10月16日)作者。
    (于2018年10月30日合并)

    pack对象
    (mingw):在正确的位置初始化
    packing\u数据
    mutex 在(
    pack objects
    :修复打包大型增量的性能问题,2018-07-22,Git v2.19.0-rc1)中,引入了一个互斥锁,用于保护设置增量大小的调用。此提交甚至添加了初始化它的代码,但位置不正确:在
    init_threaded_search()
    中,而调用
    oe_set_delta_size()
    (因此打包数据锁定())可以在调用链中发生
    检查对象()
    补充@Mark Longair的答案:

    我必须运行以下命令来修复此问题:

    git配置--global pack.windowMemory“100m”
    git配置--global pack.packSizeLimit“100m”
    git配置--全局包线程“1”
    git配置--global pack.deltaCacheSize“512m”
    

    您可以在git文档中看到关于这些命令的更多信息。

    我可以通过以下步骤解决这个问题

    步骤1.使用较小的深度进行克隆

    git克隆--深度3

    步骤2.编辑.git/config并为develop添加行。这是必需的,因为在设置深度后,我无法切换除master之外的远程分支

    [core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
        symlinks = false
        ignorecase = true
    [remote "origin"]
        url = https:<your git clone url>
        fetch = +refs/heads/master:refs/remotes/origin/master
        fetch = +refs/heads/develop:refs/remotes/origin/develop  <<--- Add this line
    [branch "master"]
        remote = origin
        merge = refs/heads/master
    [branch "develop"]
        remote = origin
        merge = refs/heads/develop
    
    [core]
    repositoryformatversion=0
    filemode=false
    裸=假
    logallrefupdates=true
    符号链接=假
    ignorecase=true
    [远程“源”]
    url=https:
    fetch=+refs/heads/master:refs/remotes/origin/master
    
    fetch=+refs/heads/develope:refs/remotes/origin/develope谢谢!我收到与OP相同的错误。我尝试实现pack.windowMemory和pack.SizeLimit配置项,但仍然收到错误。当我添加pack.threads时“1”“一切都解决了!当我尝试从svn切换到git时,我开始非常热情。但是从一个模糊的问题到另一个修复更模糊的问题,我不确定切换的决定有多明智。我有一个问题,我更改了属性pack.SizeLimit而不是pack.packSizeLimit。这解决了我的问题。非常感谢
    git config--global pack.windowMemory“100m”
    修复了我的问题,可能是