我们尝试为包含git子模块的私有项目实现Bitbucket管道。它们在我们的项目中引用如下:
[submodule "plugins-custom/plugin-A"]
path = plugins-custom/plugin-A
url = ../plugin-A.git
此存储库存在,可以使用git submodule update --init
在本地安全地检出。
使用Bitbucket管道运行相同的命令时,会在日志中打印以下行:
+ git submodule update --init
Submodule 'plugins-custom/plugin-A' (http://bitbucket.org/$team/plugin-A.git) registered for path 'plugins-custom/plugin-A'
Cloning into 'plugins-custom/plugin-A'...
fatal: could not read Username for 'https://bitbucket.org': No such device or address
Clone of 'http://bitbucket.org/$team/plugin-A' into submodule path 'plugins-custom/plugin-A' failed
我不知道为什么会发生这种情况,这些是我已经尝试过的其他步骤:
plugin-A
存储库中git submodule
正确确定的URL中给出的lke)git config http.https://bitbucket.org.proxy http://localhost:29418/
)我的设置有任何明显的错误吗?我还能尝试使其工作吗?
好吧,我没想到我的错误是如此明显,但我的同事能够迅速提供帮助:
git checkout
,而不使用SSH解决方案:使用SSH通过[email protected]:$team/plugin-A.git
执行子模块的检出