无法让Git在子模块上使用代替Of

时间:2019-06-10 16:33:04

标签: git git-submodules

我正在运行Git 2.18.0,并且试图让Git在其原始.gitmodule文件使用file://网址的存储库中使用ssh://网址

我已经在.git/config中找到了它:

submodule.dut/dev.git.active=true
submodule.dut/dev.git.url=file:///wv/mcs/tedd/repo_lib/dev.git
submodule.dut/locations.git.active=true
url.ssh://orw-tucker-vm/wv/mcs/tedd/repo_lib.insteadof=file:///wv/mcs/tedd/repo_lib```

Then I do:

```bash
% git submodule sync
% git submodule update --init

但是我得到了错误:

Cloning into '/home/rsalemi/workspaces/tedd_tb/dut/dev.git'...
fatal: '/wv/mcs/tedd/repo_lib/dev.git' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'file:///wv/mcs/tedd/repo_lib/dev.git' into submodule path '/home/rsalemi/workspaces/tedd_tb/dut/dev.git' failed
Failed to clone 'dut/dev.git' a second time, aborting

Git似乎忽略了替代配置条目。

我在做什么错了?

1 个答案:

答案 0 :(得分:1)

我使用了django-mptt,但事实证明我需要git config --local