在WSL上是否可以运行git submodule update --init?

问题描述 投票:1回答:2

我正在Windows 10机器上的Linux Linux子系统上运行Ubuntu 18.04。我刚刚从GitHub克隆了一个包含几个子模块的存储库。为了初始化这些子模块,我通常运行以下命令:git submodule update --init

但是,当我这样做时,出现错误:/usr/lib/git-core/git-submodule: 332: /usr/lib/git-core/git-sh-setup: uname: Input/output error

还有其他人看到过这种行为吗?有人知道如何解决此问题吗?

git github git-submodules windows-subsystem-for-linux
2个回答
1
投票

首先尝试使用upgrade Git(或compile it from sources)到最新的2.26.2。越来越多的子模块是rewritten in C(来自其以前的bash脚本状态),starting from 2.16(2017年第四季度)

git-sh-setup bash脚本执行一个git-sh-setup,而case $(uname -s) in应该可以工作(uname -sunless executed from a Powershell session代码可以追溯到13年前的2007年11月Git v1.6.0-rc0 uname


0
投票

问题是由于commit 87bddba在WSL Ubuntu中无法在git中找到二进制文件。并且已在Windows 10版本2004(操作系统内部版本19041.208)或更高版本的WSL2中修复。

© www.soinside.com 2019 - 2024. All rights reserved.