Trying to git clone from private repo on GitHub

Hello all,

I’m trying to git clone a private repo from GitHub in an Ansible playbook, and the playbook is hanging trying to git clone. I’ve added the SSH key that is being used for the user running Ansible as a Deploy Key in the private repo, but still am not having any luck. It’s like the key is not being forwarded or something…

Has anyone had any luck git cloning a private GitHub repo, and if so, would you care to share your playbook or a snippet of it?

Thanks very much in advance!
-jay

can you do the clone manually with the same key as the same user?

Yes, that works.

for future googlers, this issue can be solved by setting sudo:false in the role or playbook that is doing the git task