# Help: How to use ssh-add and SSH agent forwarding?

**URL:** <https://forum.ansible.com/t/help-how-to-use-ssh-add-and-ssh-agent-forwarding/38323>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [August 12, 2023, 7:45am UTC](https://forum.ansible.com/t/help-how-to-use-ssh-add-and-ssh-agent-forwarding/38323 "2023-08-12T07:45:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Fu](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@Chris\_Fu](https://forum.ansible.com/u/Chris_Fu)\
**Post date:** [August 12, 2023, 7:45am UTC](https://forum.ansible.com/t/help-how-to-use-ssh-add-and-ssh-agent-forwarding/38323/1 "2023-08-12T07:45:50Z")

</div>

Context:

I am building a playbook that will clone a private repository from github, so I need to enable ssh-add and SSH agent forwading

With native Ansible I can do it with

eval “$(ssh-agent -s)”  
ssh-add ~/.ssh/id\_rsa  
ansible-playbook …

My question is with AWX, how can I perform these two steps before running the playbook?

eval “$(ssh-agent -s)”  
ssh-add ~/.ssh/id\_rsa

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [August 16, 2023, 6:54pm UTC](https://forum.ansible.com/t/help-how-to-use-ssh-add-and-ssh-agent-forwarding/38323/2 "2023-08-16T18:54:02Z")

</div>

Hello,

You may find this documentation helpful: [https://docs.ansible.com/automation-controller/latest/html/userguide/credentials.html#source-control](https://docs.ansible.com/automation-controller/latest/html/userguide/credentials.html#openshift-or-kubernetes-api-bearer-token)  
You can set up a source control credential and then attach it to your project.

Please let us know if this helps!
