云构建在 git 个子模块上失败
Cloud build failing on git submodules
我在带有子模块的 VSTS 上托管的 git 存储库中有一个 Unity 项目,我已经将它集成到 git 存储库和 Unity 云构建中。
当 Cloud Build 厌倦了构建时,它似乎可以很好地检查所有内容,直到它到达模块,它挂在 '328 行:克隆到 'Assets/MySubmodule'... 并在那里等待构建失败前大约一个小时,因为花费的时间太长。
我有时会收到这样的错误:
“https://mycompany.visualstudio.com': Clone of 'https://mycompany.visualstudio.com/DefaultCollection/_git/mysubmodulerepopath”的用户名进入子模块路径 'Assets/mysubmodule' 失败
我认为问题可能是子模块没有被引用为 ssh 链接,而是直接被引用为 https,是否有一些解决方法或我需要做些什么才能让它们工作?
I'm thinking the issue might be that the submodules are not being referenced as ssh links but directly as https
然后,您可以再次克隆,这次使用 ssh。
首先,输入:
git config --global url."git@github.com:".insteadOf "https://github.com/"
然后再次克隆您的存储库 (git clone --recursive
)
通过更新子模块 git url 以使用 ssh
解决了这个问题
我在带有子模块的 VSTS 上托管的 git 存储库中有一个 Unity 项目,我已经将它集成到 git 存储库和 Unity 云构建中。
当 Cloud Build 厌倦了构建时,它似乎可以很好地检查所有内容,直到它到达模块,它挂在 '328 行:克隆到 'Assets/MySubmodule'... 并在那里等待构建失败前大约一个小时,因为花费的时间太长。
我有时会收到这样的错误:
“https://mycompany.visualstudio.com': Clone of 'https://mycompany.visualstudio.com/DefaultCollection/_git/mysubmodulerepopath”的用户名进入子模块路径 'Assets/mysubmodule' 失败
我认为问题可能是子模块没有被引用为 ssh 链接,而是直接被引用为 https,是否有一些解决方法或我需要做些什么才能让它们工作?
I'm thinking the issue might be that the submodules are not being referenced as ssh links but directly as https
然后,您可以再次克隆,这次使用 ssh。
首先,输入:
git config --global url."git@github.com:".insteadOf "https://github.com/"
然后再次克隆您的存储库 (git clone --recursive
)
通过更新子模块 git url 以使用 ssh
解决了这个问题