# Installing collections from Git

**URL:** <https://forum.ansible.com/t/installing-collections-from-git/35188>\
**Category:** AWX Project\
**Tags:** awx, ee\
**Created:** [May 18, 2021, 5:14pm UTC](https://forum.ansible.com/t/installing-collections-from-git/35188 "2021-05-18T17:14:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [May 18, 2021, 5:14pm UTC](https://forum.ansible.com/t/installing-collections-from-git/35188/1 "2021-05-18T17:14:39Z")

</div>

I am trying to use a requirements file to install a collection from my own git repository.

In the documentation it says that I need to have something like this:

collections:

- name: [https://github.com/organization/repo\_name.git](https://github.com/organization/repo_name.git)  
type: git  
version: devel

So I have mine looking like this

collections:

- name: [https://github.com/weiyentan/ansible.dbatools.collection.git](https://github.com/weiyentan/ansible.dbatools.collection.git)  
type: git  
version: devel

This didnt work. I thought it may be that it can’t get a collection artifact which I then added a release for. and changed the version number to v01-alpha as that has a tar.gz attached.

My version of ansible is core 2.12.0.dev0. I am using it within an execution environment in AWX.

Any help would be appreciated.

Many thanks.

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [May 19, 2021, 10:12am UTC](https://forum.ansible.com/t/installing-collections-from-git/35188/2 "2021-05-19T10:12:27Z")

</div>

You haven’t said what error you’re getting but looking at your repo, the only branch with anything in it is ‘develop’

It’s also not a valid collection:

ansible-galaxy collection install git+https://github.com/weiyentan/ansible.dbatools.collection.git,develop  
Starting galaxy collection install process  
Process install dependency map  
ERROR! git+https://github.com/weiyentan/ansible.dbatools.collection.git,develop appears to be an SCM collection source, but the required galaxy.yml was not found. Append #path/to/collection/ to your URI (before the comma separated version, if one is specified) to point to a directory containing the galaxy.yml or directories of collections

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [May 19, 2021, 10:17am UTC](https://forum.ansible.com/t/installing-collections-from-git/35188/3 "2021-05-19T10:17:57Z")

</div>

Thank you Phil for replying. Sorry I should have said develop branch. In the root directory of develop branch I have ansible.yml there. Is it not formatted correctly? I apologise if I got it wrong. It’s my first time writing a collection…and consuming it from repository.

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [May 19, 2021, 10:23am UTC](https://forum.ansible.com/t/installing-collections-from-git/35188/4 "2021-05-19T10:23:40Z")

</div>

You need a galaxy.yml metadata file for a collection, see this guide - [https://docs.ansible.com/ansible/latest/dev\_guide/developing\_collections.html](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html)

---

<div class="post-metadata">

**Author:** ![Wei-Yen\_Tan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/wei-yen_tan/32/4111_2.png) [@Wei-Yen\_Tan](https://forum.ansible.com/u/Wei-Yen_Tan)\
**Post date:** [May 20, 2021, 7:37am UTC](https://forum.ansible.com/t/installing-collections-from-git/35188/5 "2021-05-20T07:37:46Z")

</div>

Thanks Phil. I had to reread a few times what I put in the repo. Galaxy.yml. Not ansible.yml. Mind says one thing. Fingers does another :rollseyes:
