# ansible-galaxy git clone failures

**URL:** <https://forum.ansible.com/t/ansible-galaxy-git-clone-failures/25231>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [August 11, 2017, 7:22am UTC](https://forum.ansible.com/t/ansible-galaxy-git-clone-failures/25231 "2017-08-11T07:22:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prasoon\_Majumdar](https://avatars.discourse-cdn.com/v4/letter/p/e56c9b/32.png) [@Prasoon\_Majumdar](https://forum.ansible.com/u/Prasoon_Majumdar)\
**Post date:** [August 11, 2017, 7:22am UTC](https://forum.ansible.com/t/ansible-galaxy-git-clone-failures/25231/1 "2017-08-11T07:22:53Z")

</div>

Hello,

I was trying to clone roles using ansible-galaxy cli from private repo,

requirements file : working.yml

- src: git+https://git@git.xxxxxx.com/devops/ansible-role-fpm.git

name: watever.fpm  
version: master

ansible-galaxy install --role-file=ansible-galaxy.yml --roles-path=“${PWD}/roles/” --force

But its throwing errors like:

[WARNING]: - xxxxfpm was NOT installed successfully: - command git clone [https://git@git.xxxxxx.com/devops/ansible-role-fpm.git](https://git@git.xxxxxx.com/devops/ansible-role-fpm.git)  
xxxx.fpm failed in directory /tmp/tmpGS0PhX (rc=128)

ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.

I tried different combinations of “git+ssh” but nothing worked, i can easily clone it directory using “git clone” way but ansible-galaxy way is not working, ideas ???

---

<div class="post-metadata">

**Author:** ![papanito](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/papanito/32/548_2.png) [@papanito](https://forum.ansible.com/u/papanito)\
**Post date:** [March 7, 2020, 6:38pm UTC](https://forum.ansible.com/t/ansible-galaxy-git-clone-failures/25231/2 "2020-03-07T18:38:27Z")

</div>

I face the same problem but using roles from git is failing for me as well (private as well as public repo).

Also indications from [https://github.com/ansible/ansible/issues/8937](https://github.com/ansible/ansible/issues/8937) dit not help - the issue refers to ansible 1.8, wheres I am using 2.9.5

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [March 8, 2020, 6:20am UTC](https://forum.ansible.com/t/ansible-galaxy-git-clone-failures/25231/3 "2020-03-08T06:20:54Z")

</div>

Hi

Thanks for using ansible. To answer your question more information is needed. Could you please describe clearly all of the below:

- What goal you are trying to achieve.

- How you are doing this.

- What problems you encounter.

- Which commands did you run, and what actual output did you get (copied as plain text - not as screenshots, images, or other binary attachments).

- What do the relevant inventory/tasks/playbooks/code/variables look like.

- The output of ‘ansible --version’

---

<div class="post-metadata">

**Author:** ![papanito](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/papanito/32/548_2.png) [@papanito](https://forum.ansible.com/u/papanito)\
**Post date:** [March 8, 2020, 10:04am UTC](https://forum.ansible.com/t/ansible-galaxy-git-clone-failures/25231/4 "2020-03-08T10:04:13Z")

</div>

I have a `requirements.yml` which contains among other roles, roles which should be consumed directly from github/gitlab

- src: geerlingguy.docker
- src: dev-sec.ssh-hardening
- src: m4rcu5nl.zerotier-one

# own roles

# - scr: git+https://git@github.com/papanito/ansible-role-rsyslog.git

# name: papanito.rsyslog

# scm: git

# version: master

- scr: [GitHub - papanito/ansible-role-rsyslog: Ansible role to forward syslog to a log service like Loggly.com or Logz.io or newrelic](https://github.com/papanito/ansible-role-rsyslog.git)  
name: papanito.rsyslog  
path: roles  
scm: git  
version: master

# accept\_hostkey: yes

installing the requirements fails

$ ansible-galaxy install -r requirements.yml -vvvv  
ansible-galaxy 2.9.5  
config file = /home/papanito/Workspaces/infrastructure/ansible.cfg  
configured module search path = [‘/home/papanito/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python3.8/site-packages/ansible  
executable location = /usr/bin/ansible-galaxy  
python version = 3.8.1 (default, Jan 22 2020, 06:38:00) [GCC 9.2.0]  
Using /home/papanito/Workspaces/infrastructure/ansible.cfg as config file  
Reading requirement file at ‘requirements.yml’  
found role {‘src’: ‘geerlingguy.docker’, ‘name’: ‘geerlingguy.docker’, ‘version’: ‘’, ‘scm’: None} in yaml file  
found role {‘src’: ‘dev-sec.ssh-hardening’, ‘name’: ‘dev-sec.ssh-hardening’, ‘version’: ‘’, ‘scm’: None} in yaml file  
found role {‘src’: ‘m4rcu5nl.zerotier-one’, ‘name’: ‘m4rcu5nl.zerotier-one’, ‘version’: ‘’, ‘scm’: None} in yaml file  
found role {‘name’: ‘papanito.rsyslog’, ‘scm’: ‘git’, ‘version’: ‘master’} in yaml file  
Processing role geerlingguy.docker  
[WARNING]: - geerlingguy.docker (2.5.3) is already installed - use --force to change version to unspecified  
Processing role dev-sec.ssh-hardening  
[WARNING]: - dev-sec.ssh-hardening (7.0.0) is already installed - use --force to change version to unspecified  
Processing role m4rcu5nl.zerotier-one  
[WARNING]: - m4rcu5nl.zerotier-one (v1.2.2) is already installed - use --force to change version to unspecified  
Processing role papanito.rsyslog  
[WARNING]: - papanito.rsyslog was NOT installed successfully: - command /usr/bin/git clone papanito.rsyslog papanito.rsyslog failed in directory  
/home/aedu/.ansible/tmp/ansible-local-914052zr2sg8jg/tmpp1mc9csj (rc=128)

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [March 8, 2020, 12:54pm UTC](https://forum.ansible.com/t/ansible-galaxy-git-clone-failures/25231/5 "2020-03-08T12:54:29Z")

</div>

> I have a `requirements.yml` which contains among other roles, roles which should be consumed directly from github/gitlab
> 
> - src: geerlingguy.docker  
> - src: dev-sec.ssh-hardening  
> - src: m4rcu5nl.zerotier-one
> 
> # own roles  
> # - scr: git+[https://git@github.com/papanito/ansible-role-rsyslog.git](https://git@github.com/papanito/ansible-role-rsyslog.git)  
> # name: papanito.rsyslog  
> # scm: git  
> # version: master  
> - scr: [https://github.com/papanito/ansible-role-rsyslog.git](https://github.com/papanito/ansible-role-rsyslog.git)  
> name: papanito.rsyslog  
> path: roles  
> scm: git  
> version: master  
> # accept\_hostkey: yes

You are using scr instead of src, which looks like a typo to me.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![papanito](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/papanito/32/548_2.png) [@papanito](https://forum.ansible.com/u/papanito)\
**Post date:** [March 8, 2020, 1:09pm UTC](https://forum.ansible.com/t/ansible-galaxy-git-clone-failures/25231/6 "2020-03-08T13:09:02Z")

</div>

Yeah right, I really didn’t spot that! Thanks a lot
