无法更新Git子模块

3

我目前正在尝试从我的git仓库克隆一些vim设置,而该仓库主要包含其他托管项目的子模块。然而,当我尝试更新所有子模块时,我会收到以下错误信息。

Cloning into bundle/ack...
remote: Counting objects: 318, done.
remote: Compressing objects: 100% (189/189), done.
remote: Total 318 (delta 124), reused 256 (delta 70)
Receiving objects: 100% (318/318), 48.13 KiB, done.
Resolving deltas: 100% (124/124), done.
Submodule path 'bundle/ack': checked out 'fd9632b40ac07b39adb270311cde2c460c9ba6da'
Cloning into bundle/command-t...
remote: Counting objects: 2820, done.
remote: Compressing objects: 100% (1434/1434), done.
remote: Total 2820 (delta 1348), reused 2574 (delta 1122)
Receiving objects: 100% (2820/2820), 2.75 MiB | 701 KiB/s, done.
Resolving deltas: 100% (1348/1348), done.
Submodule path 'bundle/command-t': checked out '07087e16ba8fe0a87b1d1ccd03e158a0157dc1f8'
Cloning into bundle/fugitive...
error: RPC failed; result=22, HTTP code = 400
fatal: The remote end hung up unexpectedly
Clone of 'http://github.com/tpope/vim-fugitive.git' into submodule path 'bundle/fugitive' failed

我无法更新其余的插件。我正在通过ssh访问github(而不是HTTPS)。此外,我是否可以单独更新其余的插件(子模块)?


请检查子模块路径是否正确 - 您收到了一个 HTTP/400 错误,这意味着请求格式不正确。我认为路径可能略有偏差。 - Dave G
1个回答

1

请确保您能够重现此问题:这是否有效?

 git clone http://github.com/tpope/vim-fugitive.git

我刚刚测试过了,克隆正常。

可能是由于最近GitHub可用性问题导致的故障:

14:22 UTC 由于我们的一对文件服务器进行紧急维护,小部分git存储库目前无法使用。

其次,您的url没有使用https:您可以尝试切换url为:

https://github.com/tpope/vim-fugitive
or
git@github.com:tpope/vim-fugitive.git

为此,使用Git 1.8.3+,您需要执行以下操作:

git submodule deinit bundle/fugitive
# edit .gitmodules
git submodule update --init bundle/fugitive

对于未来阅读此帖子的人而言,值得一提的是 - 我们遇到了非常相似的问题,其中sshhttps调用之间的差异正是问题所在,但我们需要为每个子模块编辑两个文件 - 在.gitmodule中编辑存储库的路径并在.git/config中编辑存储库的路径。 - wilfo

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接