羊羊羊1994 2021-06-20 20:09 采纳率: 0%
浏览 391

报错:revision master in kernel_linux not found

拉OpenHarmony代码 repo sync 的时候报错:

Receiving objects:  17% (1112924/6319351), 518.36 MiB | 1.28 MiB/s

fatal: the remote end hung up unexpectedly 1.00 GiB | 4.47 MiB/s
fatal: early EOF
fatal: index-pack failed
kernel_linux:
remote: Enumerating objects: 6319351, done.
remote: Counting objects: 100% (4283/4283), done.
remote: Compressing objects: 100% (164/164), done.
fatal: the remote end hung up unexpectedly 1.00 GiB | 4.47 MiB/s
fatal: early EOF
fatal: index-pack failed

error: Cannot fetch kernel_linux from https://gitee.com/openharmony/kernel_linux
Fetching projects: 100% (221/221), done.
Checking out projects:  52% (116/221) interface_sdk-jserror: Cannot checkout kernel_linux: ManifestInvalidRevisionError: revision master in kernel_linux not found
error: in `sync -c`: revision master in kernel_linux not found

 

是在WSL里拉的代码。请问这个报错如何解决呢?

都是按教程走的:

https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/%E6%BA%90%E7%A0%81%E8%8E%B7%E5%8F%96.md

获取标准系统源码(2.0 Canary)

  1. 创建并切换到OpenHarmony工作目录。

    mkdir OpenHarmony
    cd OpenHarmony
  2. repo初始化。

    repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
    # 使用此命令初始化时,可能会因为网络慢的问题导致代码更新失败,可以尝试以下命令来初始化:
    repo init -u https://gitee.com/openharmony/manifest.git -b ssh/master --no-repo-verify
  3. 更新代码。

    repo sync -c
  4. 更新二进制。

    repo forall -c 'git lfs pull'
  • 写回答

1条回答 默认 最新

  • Kwan的解忧杂货铺 Java领域优质创作者 2024-03-03 16:17
    关注

    羊羊羊1994 下午好🌅🌅🌅
    本答案参考ChatGPT-3.5

    报错信息表明你在尝试从kernel_linux仓库同步代码时遇到了问题,具体是revision master in kernel_linux not found,这表示你想要检出的master分支不存在。以下是解决这个问题的步骤:

    1. 检查仓库分支: 首先,确认kernel_linux仓库的当前可用分支。打开终端,进入你的OpenHarmony工作目录,然后运行以下命令:

      cd OpenHarmony
      repo forall -c 'git ls-remote --heads https://gitee.com/openharmony/kernel_linux'
      

      查看输出,找到master分支是否确实存在。

    2. 更新manifest文件: 如果没有master分支,你可能需要更新manifest.xml文件中的kernel_linux引用。使用以下命令替换https://gitee.com/openharmony/kernel_linux为正确的分支名(比如mainrelease):

      repo init -u https://gitee.com/openharmony/manifest.git -b <branch_name> --no-repo-verify
      
    3. 再次同步代码: 重新执行同步操作,确保使用正确的分支名:

      repo sync -c
      

      或者

      repo sync -c --all
      
    4. 处理LFS问题: 如果仍然遇到LFS问题,可以单独处理LFS对象:

      repo forall -c 'git lfs pull'
      
    5. 网络问题: 如果上述步骤无法解决问题,可能是网络问题导致的。你可以尝试断开网络连接,清理缓存,或者更换网络环境后重试。

    如果问题依然存在,建议查看官方文档或者联系OpenHarmony社区寻求帮助。

    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!