gpt4 book ai didi

git - 使用 ansible 克隆带有子模块的 git 项目

转载 作者:行者123 更新时间:2023-12-04 03:04:11 25 4
gpt4 key购买 nike

虽然看起来很简单,但在尝试克隆具有子模块的 git 存储库时,我的 ansible 设置挂起。 'parent' repo 被克隆没有问题,但是 ansible 任务无法克隆子模块并且实际上在此之后挂起,几乎就像它期待一些响应一样......

这是我克隆 repo 的 ansible 任务:

- name: Clone/Pull the {{ certificate_authority.repo.name }} repository
become: yes
git: repo="{{ ca.repo.url }}" force=yes accept_hostkey=yes clone=yes version="{{ git_branch | default(git_tag) }}"
dest="{{ ca.repo.dest }}" key_file={{ ca.repo.key.location }}/{{ ca.repo.key.name }} recursive=yes track_submodules=yes

知道为什么 ansible 挂起克隆这个 repo 吗?

最佳答案

对于遇到此问题的其他人,解决方法是确保 .gitmodules 中的子模块文件使用 git协议(protocol)即 ssh://git@....

关于git - 使用 ansible 克隆带有子模块的 git 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46154722/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com