我正在尝试使用 Azure Web 应用中的部署源
选项将包含子模块的 VSTS (Visual Studio Team Services) Git 应用部署到 Azure。
所有子模块都托管在同一个 VSTS 项目中,但位于不同的 Git 存储库下。
部署到 Azure 失败并显示以下错误消息:
fatal: could not read Username for 'https://XXX.visualstudio.com': Bad file descriptor\nClone of 'https://XXX.visualstudio.com/defaultcollection/Project/_git/Project.API.Models' into submodule path 'lib/api-models' failed\n\r\nD:\Program Files (x86)\Git\cmd\git.exe submodule update --init --recursive
有没有办法将 Git 项目(包括子模块)部署到 Azure?
最佳答案
因此,我找到了一种解决方法,可以让 Azure 上的 git 部署与子模块一起使用。
- 通过点击 VSTS 中的克隆,然后点击个人访问 token 来创建个人访问 token 。
- 复制访问 token 并修改
.gitmodules
中所有子模块的 URL文件。 - git 模块的 url 应该如下所示:
https://deployment:<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f0a9bfa5a2b3bfa0b9b5b4b1a0b9bbb5a9b0a8a8a8de86998385919c83848594999fde939f9d" rel="noreferrer noopener nofollow">[email protected]</a>/defaultcollection/Project/_git/Project.API.Models
确保将 API key 粘贴到所有子模块以及子模块的子模块中。 promise 并 push ,你就可以开始了。
用户名deployment
在这种情况下可以是任何随机名称。
关于git - 在 Azure 上使用 Git 子模块持续部署 VSTS 应用程序失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37657278/