# requirements.yml to gitlab repo with ssh key

**URL:** <https://forum.ansible.com/t/requirements-yml-to-gitlab-repo-with-ssh-key/29262>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [December 14, 2018, 9:34am UTC](https://forum.ansible.com/t/requirements-yml-to-gitlab-repo-with-ssh-key/29262 "2018-12-14T09:34:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cava\_cavamagie](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@cava\_cavamagie](https://forum.ansible.com/u/cava_cavamagie)\
**Post date:** [December 14, 2018, 9:34am UTC](https://forum.ansible.com/t/requirements-yml-to-gitlab-repo-with-ssh-key/29262/1 "2018-12-14T09:34:23Z")

</div>

hi i usi a scm with scm privare key  
to download project no problem

when i use a requirement.yml  
like this

- src: [git@anacard.com](mailto:git@anacard.com)/AnsibleGalaxy/Common.git  
scm: git  
version: master

i receive this error  
i see in the manual that the configuration for github is correct  
example

```auto
# from GitLab or other git-based scm
- src: git@gitlab.company.com:mygroup/ansible-base.git
  scm: git
  version: "0.1" # quoted, so YAML doesn't parse this as a floating-point value

```

whats it’s wrong ??

{  
“\_ansible\_parsed”: true,  
“stderr\_lines”: [  
“\u001b[1;35m [WARNING]: - Common was NOT installed successfully: - command /usr/bin/git\u001b[0m”,  
“\u001b[1;35mclone [git@gitlab.anacard.com](mailto:git@gitlab.anacard.com)/AnsibleGalaxy/Common.git Common failed in directory\u001b[0m”,  
“\u001b[1;35m/var/lib/awx/.ansible/tmp/ansible-local-72j3SkVV/tmpaaF76g (rc=128)\u001b[0m”,  
“\u001b[1;35m\u001b[0m”,  
“\u001b[0;31mERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.\u001b[0m”  
],  
“cmd”: [  
“AnsibleGalaxy”,  
“install”,  
“-r”,  
“requirements.yml”,  
“-p”,  
“/var/lib/awx/projects/\_25\_\_proj\_l6\_common\_ansible\_galaxy100208/roles/”  
],  
“end”: “2018-12-14 09:15:53.772215”,  
“\_ansible\_no\_log”: false,  
“stdout”: “”,  
“changed”: false,  
“start”: “2018-12-14 09:15:51.309139”,  
“delta”: “0:00:02.463076”,  
“stderr”: “\u001b[1;35m [WARNING]: - Common was NOT installed successfully: - command /usr/bin/git\u001b[0m\n\u001b[1;35mclone [git@gitlab.anacard.com](mailto:git@gitlab.anacard.com)/AnsibleGalaxy/Common.git Common failed in directory\u001b[0m\n\u001b[1;35m/var/lib/awx/.ansible/tmp/ansible-local-72j3SkVV/tmpaaF76g (rc=128)\u001b[0m\n\u001b[1;35m\u001b[0m\n\u001b[0;31mERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.\u001b[0m”,  
“rc”: 1,  
“invocation”: {  
“module\_args”: {  
“warn”: true,  
“executable”: null,  
“chdir”: “/var/lib/awx/projects/\_25\_\_proj\_l6\_common\_ansible\_galaxy100208/roles”,  
“\_raw\_params”: “AnsibleGalaxy install -r requirements.yml -p /var/lib/awx/projects/\_25\_\_proj\_l6\_common\_ansible\_galaxy100208/roles/”,  
“removes”: null,  
“argv”: null,  
“creates”: null,  
“\_uses\_shell”: false,  
“stdin”: null  
}  
},  
“stdout\_lines”: ,  
“msg”: “non-zero return code”  
}

---

<div class="post-metadata">

**Author:** ![klaasdemter](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@klaasdemter](https://forum.ansible.com/u/klaasdemter)\
**Post date:** [December 17, 2018, 2:56pm UTC](https://forum.ansible.com/t/requirements-yml-to-gitlab-repo-with-ssh-key/29262/2 "2018-12-17T14:56:02Z")

</div>

awx will reuse the credentials you use for the main project.

It works for me if I specify the git repos in roles/requirements.yml like this:  
- name: ansible-role-custom  
src: git@gitlab.domain.tld:group/ansible-role-custom.git  
scm: git

This means if your main project credentials also need to work for the ansible-role-custom gitrepo.

Greetings  
Klaas

---

<div class="post-metadata">

**Author:** ![cava\_cavamagie](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@cava\_cavamagie](https://forum.ansible.com/u/cava_cavamagie)\
**Post date:** [December 17, 2018, 3:26pm UTC](https://forum.ansible.com/t/requirements-yml-to-gitlab-repo-with-ssh-key/29262/3 "2018-12-17T15:26:04Z")

</div>

hi thanks for your answer

but i i run i see

ASK [fetch galaxy roles from requirements.yml] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
16:24:53  
19  
The authenticity of host 'gitlab.anacard.com (192.168.8.174)' can't be  
established.  
20  
RSA key fingerprint is SHA256:dhUUOP1Hofnr68gGddoGBeMncmTHk3ckkdtvmiJvV/U.  
21  
RSA key fingerprint is MD5:c8:c1:b0:80:c7:2a:5b:60:18:07:6e:c7:13:23:f1:e6.  
22  
Are you sure you want to continue connecting (yes/no)?  
23
