# Credentials for Role(s) download via requirements.yml

**URL:** <https://forum.ansible.com/t/credentials-for-role-s-download-via-requirements-yml/31941>\
**Category:** AWX Project\
**Tags:** awx, galaxy-ng\
**Created:** [January 9, 2020, 2:48pm UTC](https://forum.ansible.com/t/credentials-for-role-s-download-via-requirements-yml/31941 "2020-01-09T14:48:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Biel](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@Jason\_Biel](https://forum.ansible.com/u/Jason_Biel)\
**Post date:** [January 9, 2020, 2:48pm UTC](https://forum.ansible.com/t/credentials-for-role-s-download-via-requirements-yml/31941/1 "2020-01-09T14:48:53Z")

</div>

I am attempting to use a requirements.yml file within the roles/ directory of a project that installs roles via git repos. The roles/requirements.yml file is formatted as such:

bash-4.4# cat roles/requirements.yml

- src: git+ssh://git@gitserver:7999/project/ansible.role.juniper.junos.git  
scm: git  
name: Juniper.junos  
version: master

The issue is our git server is configured to only allow access via SSH and when the git clone is attempted upon the job execution it fails.

The project itself syncs fine within AWX using the associated stored credential we have within AWX but I am assuming the job execution fails because there isn’t a credential/key associated to the job itself or the underlying tasks executed within the playbook, such as the ansible-galaxy install via git with the roles/requirements.yml.

Is my assumption correct? If so, are there any solutions to this?

---

<div class="post-metadata">

**Author:** ![Jason\_Biel](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@Jason\_Biel](https://forum.ansible.com/u/Jason_Biel)\
**Post date:** [January 10, 2020, 3:11pm UTC](https://forum.ansible.com/t/credentials-for-role-s-download-via-requirements-yml/31941/2 "2020-01-10T15:11:11Z")

</div>

Doing some more testing after adding the awx user key to the repo, I’ve found that running the playbook via the CLI doesn’t import the role, but running ansible-galaxy install -r roles/requirements.yml works fine.

It only bombs and fails to pull the role down when executed via the playbook. I’m using the same ansible.cfg for the playbook (since it has the roles\_path defined) for the playbook and ansible-galaxy install.
