Git子模块CodeCommit

5

我在 AWS CodeCommit 中有两个仓库,我想将其中一个仓库添加为另一个仓库的子模块。

这两个仓库位于某个角色下面,而不是根帐户下面。

.gitmodules(Repo1 中的文件)

[submodule "submodule"]
path = sub/module
url = codecommit://Repo2

随着

git submodule update

我理解

fatal: transport 'codecommit' not allowed
fatal: clone of 'codecommit://Repo2' into submodule path 'sub/module' failed

我不能使用HTTPS,因为我不知道如何通过HTTPS切换角色。

1个回答

12

秘诀在于配置git始终使用传输方式。

git config --global --add protocol.codecommit.allow always

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