[英]Unable to install ansible collections from a private git repository using Https and SSH link
I am getting the below error it works with the tar file which i need to clone and install.我收到以下错误,它适用于我需要克隆和安装的 tar 文件。 As per ansible document we can install using the below methods.
根据 ansible 文档,我们可以使用以下方法安装。
https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-a-collection-from-a-git-repository https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-a-collection-from-a-git-repository
why is it asking for tar file in my case?为什么在我的情况下要求 tar 文件?
[root@oc1546875**4 collections_repository1]# ansible-galaxy collection install git@github.i m.com:samnanajeeb/test_collections.git Process install dependency map ERROR. [root@oc1546875**4 collections_repository1]# ansible-galaxy collection install git@github.i m.com:samnanajeeb/test_collections.git Process install dependency map ERROR. Invalid collection name 'git@github.i m.com', name must be in the format.. Please make sure namespace and collection name contains characters from [a-zA-Z0-9_] only.
集合名称 'git@github.im.com'无效,名称必须采用格式。请确保命名空间和集合名称仅包含 [a-zA-Z0-9_] 中的字符。
[root@oc1546875**4 collections_repository2]# ansible-galaxy collection install https://github.i*m.com/Ansible-Self-Study/collections_repository1.git Process install dependency map ERROR. [root@oc1546875**4 collections_repository2]# ansible-galaxy collection install https://github.i*m.com/Ansible-Self-Study/collections_repository1.git Process install dependency map ERROR. Collection artifact at '/root/.ansible/tmp/ansible-local-7328qnvhfs/tmpOWt66o/collections_repository1SxEx78.git' is not a valid tar file.
'/root/.ansible/tmp/ansible-local-7328qnvhfs/tmpOWt66o/collections_repository1SxEx78.git' 处的集合工件不是有效的 tar 文件。
The docs specify that one must prefix https:
with git+https:
in order to advise ansible the URL does not just produce bytes but must be git installed. The docs specify that one must prefix
https:
with git+https:
in order to advise ansible the URL does not just produce bytes but must be git installed. I would guess, based on my experiences with ansible coding practices, that your first error is caused by them hard-coding github.com
, so try git+ssh://git@github.im.com/samn.../test_collections.git
to (for the same reason) advise ansible that the path needs to be git cloned我猜,根据我对 ansible 编码实践的经验,你的第一个错误是由他们硬编码
github.com
引起的,所以试试git+ssh://git@github.im.com/samn.../test_collections.git
. git+ssh://git@github.im.com/samn.../test_collections.git
(出于同样的原因)建议ansible该路径需要被git克隆
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.