1.Error

Fetching projects: 100% (725/725), done.
Checking out files: 100% (4605/4605), done.out files: 41% (1902/4605)
Checking out files: 100% (4371/4371), done.out files: 2% (89/4371)
Checking out files: 100% (48/48), done.king out files: 35% (17/48)
Checking out files: 100% (13649/13649), done.ut files: 43% (5897/13649)
Checking out files: 100% (9868/9868), done. out files: 33% (3318/9868)
Checking out files: 100% (21681/21681), done.ut files: 14% (3196/21681)
Checking out files: 100% (5902/5902), done. out files: 40% (2407/5902)
Checking out files: 100% (278/278), done.ng out files: 48% (134/278)
Checking out files: 100% (677/677), done.ng out files: 36% (247/677)
Checking out files: 100% (5491/5491), done. out files: 37% (2055/5491)
Checking out files: 100% (43496/43496), done.ut files: 6% (2893/43496)
Checking out files: 100% (16115/16115), done.
Checking out files: 100% (2626/2626), done. out files: 37% (985/2626)
Checking out files: 100% (3081/3081), done. out files: 45% (1389/3081)
Checking out files: 100% (33649/33649), done.ut files: 1% (401/33649)
Checking out files: 100% (2822/2822), done. out files: 25% (725/2822)
Checking out files: 100% (60891/60891), done.ut files: 12% (7317/60891)
Checking out files: 100% (4780/4780), done. out files: 22% (1077/4780)
Checking out files: 100% (3472/3472), done. out files: 44% (1542/3472)
fatal: failed to unpack tree object HEAD
Traceback (most recent call last):
File "/home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/repo/main.py", line 500, in <module>
_Main(sys.argv[1:])
File "/home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/repo/main.py", line 476, in _Main
result = repo._Run(argv) or 0
File "/home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/repo/main.py", line 155, in _Run
result = cmd.Execute(copts, cargs)
File "/home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/repo/subcmds/sync.py", line 675, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/repo/project.py", line 1170, in Sync_LocalHalf
self._InitWorkTree()
File "/home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/repo/project.py", line 2230, in _InitWorkTree
raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree

2.Solution

①repo --trace sync -cdf将repo的所有动作详细输出:

repo --trace sync -cdf
: unpickle /home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/manifests.git/config
: unpickle /home/lenovosh/.gitconfig
: unpickle /home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/repo/.git/config
: export GIT_DIR=/home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/manifests.git
: git fetch origin --tags +refs/heads/release:refs/remotes/origin/release
: load refs /home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/manifests.git
: scan refs /home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/manifests.git
Fetching project platform/packages/apps/Car/Cluster
: unpickle /home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/projects/packages/apps/Car/Cluster.git/config : export GIT_DIR=/home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/projects/packages/apps/Car/Cluster.git
: git rev-parse --verify fa927c0de153e238013497a16f64007bfb89a780^0 1>| 2>|
: load refs /home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/projects/packages/apps/Car/Cluster.git
: scan refs /home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/projects/packages/apps/Car/Cluster.git
Fetching project platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8
: unpickle /home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/projects/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8.git/config : export GIT_DIR=/home/lenovosh/Qualcomm/SourceCode/mirror/SDM845_r00110.1/Android/.repo/projects/prebuilts/android-emulator.git
: git rev-parse --verify cbdfa5df4f2105148cc2fa6ce4ddf3bc1695b488^0 1>| 2>|
: git rev-parse --verify cbdfa5df4f2105148cc2fa6ce4ddf3bc1695b488^0 1>| 2>|
: git fetch caf --tags +refs/heads/ks-aosp.lnx.2.0.r1-rel:refs/remotes/caf/ks-aosp.lnx.2.0.r1-rel
remote: Counting objects: 8539, done.
remote: Compressing objects: 100% (1256/1256), done.
Receiving objects: 58% (4966/8539), 94.70 MiB | 12.00 KiB/s error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
: git rev-parse --verify cbdfa5df4f2105148cc2fa6ce4ddf3bc1695b488^0 1>| 2>|
: git fetch caf --tags +refs/heads/*:refs/remotes/caf/*
remote: Counting objects: 8552, done.
remote: Compressing objects: 100% (1269/1269), done.
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
fatal: The remote end hung up unexpectedly
fatal: protocol error: bad pack header
: git fetch caf --tags +refs/heads/*:refs/remotes/caf/*
remote: Counting objects: 8553, done.
remote: Compressing objects: 100% (1270/1270), done.

②因此,将prebuilts/android-emulator这个文件夹删除,在.repo/projects下删除.repo/projects/prebuilts/android-emulator.git目录,以及.repo/project-objects/prebuilts/android-emulator.git目录

③最后重新repo sync即可

【Repo】repo sync:error.GitError: cannot initialize work tree的更多相关文章

  1. 【BZOJ4736】温暖会指引我们前行(Link-Cut Tree)

    [BZOJ4736]温暖会指引我们前行(Link-Cut Tree) ##题面 神TM题面是UOJ的 题解 LCT傻逼维护最大生成树 不会的可以去做一做魔法森林 #include<iostrea ...

  2. 【BZOJ3626】LCA(树链剖分,Link-Cut Tree)

    [BZOJ3626]LCA(树链剖分,Link-Cut Tree) 题面 Description 给出一个n个节点的有根树(编号为0到n-1,根节点为0).一个点的深度定义为这个节点到根的距离+1. ...

  3. 【BZOJ2157】旅游(树链剖分,Link-Cut Tree)

    [BZOJ2157]旅游(树链剖分,Link-Cut Tree) 题面 Description Ray 乐忠于旅游,这次他来到了T 城.T 城是一个水上城市,一共有 N 个景点,有些景点之间会用一座桥 ...

  4. 【LeetCode】863. All Nodes Distance K in Binary Tree 解题报告(Python)

    [LeetCode]863. All Nodes Distance K in Binary Tree 解题报告(Python) 作者: 负雪明烛 id: fuxuemingzhu 个人博客: http ...

  5. 【LeetCode】331. Verify Preorder Serialization of a Binary Tree 解题报告(Python)

    [LeetCode]331. Verify Preorder Serialization of a Binary Tree 解题报告(Python) 标签: LeetCode 题目地址:https:/ ...

  6. 【LeetCode】109. Convert Sorted List to Binary Search Tree 解题报告(Python)

    [LeetCode]109. Convert Sorted List to Binary Search Tree 解题报告(Python) 标签(空格分隔): LeetCode 作者: 负雪明烛 id ...

  7. 【转】repo sync同步Android 源代码下载到99%出错

    原文网址:http://blog.csdn.net/mr_president/article/details/7693707 根据Google官网上的方法在我们实验室搭建了一个本地的Android代码 ...

  8. 【转】repo 的一些用法和理解-不错

    原文网址:http://blog.csdn.net/yasin_lee/article/details/5975068 repo的用法(zz) 注:repo只是google用Python脚本写的调用g ...

  9. 【转】repo介绍

    Android 使用 Git 作为代码管理工具,开发了 Gerrit 进行代码审核以便更好的对代码进行集中式管理,还开发了 Repo 命令行工具,对 Git 部分命令封装,将百多个 Git 库有效的进 ...

随机推荐

  1. HZOJ 简单的期望

    性质:一个数分解质因数后2的次数=二进制下末尾连续0的个数. 乘2比较好考虑,比较恶心的是+1.一个$k*2^0$的数+1后可能会出现很多情况.但是k这个数表示不出来. 但是加的操作最多有200次,也 ...

  2. 原生js实现复制文本到粘贴板

    项目中经常会遇到点击按钮复制订单号.订单id等内容到粘贴板中的需求.可是通常我们都是用Ctrl + c或右击复制的,别操心,js也是有复制命令的,那就是document.execCommand('co ...

  3. 捕捉WPF应用程序中XAML代码解析异常

    原文:捕捉WPF应用程序中XAML代码解析异常 由于WPF应用程序中XAML代码在很多时候是运行时加载处理的.比如DynamicResource,但是在编译或者运行的过程中,编写的XAML代码很可能有 ...

  4. 2018-8-10-win10-uwp-使用动画修改-Grid-column-的宽度

    title author date CreateTime categories win10 uwp 使用动画修改 Grid column 的宽度 lindexi 2018-08-10 19:17:19 ...

  5. python 集合运算

  6. 自定义View系列教程02--onMeasure源码详尽分析

    深入探讨Android异步精髓Handler 站在源码的肩膀上全解Scroller工作机制 Android多分辨率适配框架(1)- 核心基础 Android多分辨率适配框架(2)- 原理剖析 Andr ...

  7. pytorch nn.Embedding

    pytorch nn.Embeddingclass torch.nn.Embedding(num_embeddings, embedding_dim, padding_idx=None, max_no ...

  8. CREATE OR REPLACE FUNCTION

    CREATE OR REPLACE FUNCTION SF_Taishou_Ksai_Date(v_receiptNum IN CHAR,                                ...

  9. vscode settings.json配置

    // 将设置放入此文件中以覆盖默认设置 { "editor.fontSize": 18, "editor.tabSize": 2, "editor.m ...

  10. typescript基础语法--变量/函数/指令/类

    博客地址 :https://www.cnblogs.com/sandraryan/ 要把ts文件引入到html中,首先要转码为js文件. 步骤: 终端运行: npm i -g typescript t ...