我遇到了一个奇怪的问题,花费了很长时间搜索但没有找到解决方案。
我有一个名为
以及
在该目录下,我按照Git-Tools-Submodules中的步骤进行操作:
首先初始化子模块,
我有一个名为
lapp-yhkt
(本地路径:/g/webstorm/lapp-yhkt
)的主项目:![enter image description here](https://istack.dev59.com/Zjubc.webp)
.gitmodules
文件的内容:![enter image description here](https://istack.dev59.com/MNUOk.webp)
首先初始化子模块,
$ git submodule init
Submodule 'app/base' (https://git.mobcb.com/liteapp/lapp-base.git) registered for path 'app/base'
更新IT技术后,出现致命错误。
$ git submodule update
Cloning into 'G:/webstorm/lapp-yhkt/app/base'...
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://git.mobcb.com': Invalid argument
fatal: clone of 'https://git.mobcb.com/liteapp/lapp-base.git' into submodule path 'G:/webstorm/lapp-yhkt/app/base' failed
接下来,我还尝试了git submodule sync
和git submodule update
:
$ git submodule sync
Synchronizing submodule url for 'app/base'
$ git submodule update
Cloning into 'G:/webstorm/lapp-yhkt/app/base'...
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://git.mobcb.com': Invalid argument
fatal: clone of 'https://git.mobcb.com/liteapp/lapp-base.git' into submodule path 'G:/webstorm/lapp-yhkt/app/base' failed
我遇到了同样的错误,这让我很沮丧。希望有人能帮助我,提前致谢。
编辑:我在Windows环境下使用了git。
git clone git@github.com:{username}/{repo}.git
。 - LuFFy