Azure DevOps构建子模块 [英] Azure DevOps Build Submodule

查看:53
本文介绍了Azure DevOps构建子模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个专用的Bitbucket存储库,该存储库已连接到Azure DevOps生成管道.私有存储库有一个连接到公共Github存储库的子模块.

I have a private bitbucket repo that is connected to the Azure DevOps Build Pipeline. The private repo has a submodule connected to a public Github repo.

两个存储库均可通过SSH访问.

Both repositories are accessed via SSH.

我已在DevOps中选中了克隆子模块框.

I have ticked the clone submodules box in DevOps.

如何为Azure DevOps提供SSH密钥,以便它克隆子模块?

How do I provide an SSH key to Azure DevOps so it will clone the submodule?

推荐答案

解决方案不是更改为https或设置自托管代理.

The solution for this was not to change to https, or setup a self hosted agent.

有一个名为加载SSH密钥"的步骤.

There is a step available called Load an SSH key.

我在github上创建了一个新的ssh密钥,并在VSTS任务中添加了加载SSH密钥"步骤.

I created a new ssh key on github, added the Load SSH Key step to the VSTS tasks.

它在Checkout任务之前运行(尽管随后出现在队列中),并将所需的ssh密钥加载到代理上

It runs before the Checkout task (despite appearing in the queue afterwards) and loads the required ssh key on the agent

这篇关于Azure DevOps构建子模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆