我在 Ansible Galaxy 中注意到,当我导航到https://galaxy.ansible.com/my-content/namespaces时,我看到两个命名空间:
- 一个对应于我的 GitHub 用户名,比如说
user
. - 一个对应于我创建的一个 GitHub 组织,比如说
mycompany
.
我可以mycollection
在命名空间下构建一个集合user
,mycompany
但发布只能在user
. 换句话说,我只能发布user.mycollection
. 如果我尝试发布mycompany.mycollection
,则会出现错误消息
user:~/git/ … /ansible-collection-apps] master* ± ansible-galaxy collection publish *.tar.gz --token=2daf0378704a85722dc8a358359f8967b0681917
Publishing collection artifact '/home/user/git/github/mycompany/mycollection/mycollection-1.0.0.tar.gz' to default https://galaxy.ansible.com/api/
ERROR! Error when publishing collection to default (https://galaxy.ansible.com/api/) (HTTP Code: 400, Message: Namespace "mycompany" does not exist. Code: invalid)
显然,我正在使用从 GitHub 组织创建的 Galaxy 命名空间,例如mycompany
以一种意想不到的方式。
这些命名空间打算如何使用?它们可以使用吗?我尝试了例如命名空间user.mycompany
,但这不是一个有效的集合命名空间。