I have recently been tasked to migrate our ansible playbooks and roles over to github from bitbucket as we want to consolidate our systems. I am currently running into a permissions issue when I am trying to call a role from a playbook.
playbook is in it’s own repo (let’s call it pb-repo) and role is in another repo (let’s call it ar-repo).
in bitbucket, it works perfectly fine as I have in the roles/requirements.yml file of the playbook that calls that bitbucket repo
- src: git+ssh//ansible@bitbucket.server.io/ar-repo/ar-repo.git
however, this doesn’t work in github. I have created credentials in awx, uploaded the ssh key into github and it does sync the playbook repo.
roles/requirements.yml for playbook in github
- src: git+ssh//ansible@github.com/ar-repo/ar-repo.git
error message for reference:
"ansible@github.com: Permission denied (publickey). fatal: Could not read from",
"remote repository. Please make sure you have the correct access rights and the",
"repository exists.
I’ve tried recreating the credentials, I matched the credentials to the old credentials. Tried using the old credentials as well without any luck. any ideas?