# Avoid typing the credentials for ansible-pull all the time

**URL:** <https://forum.ansible.com/t/avoid-typing-the-credentials-for-ansible-pull-all-the-time/27965>\
**Category:** Ansible Project\
**Created:** [July 5, 2018, 11:05pm UTC](https://forum.ansible.com/t/avoid-typing-the-credentials-for-ansible-pull-all-the-time/27965 "2018-07-05T23:05:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maik\_Brauer](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Maik\_Brauer](https://forum.ansible.com/u/Maik_Brauer)\
**Post date:** [July 5, 2018, 11:05pm UTC](https://forum.ansible.com/t/avoid-typing-the-credentials-for-ansible-pull-all-the-time/27965/1 "2018-07-05T23:05:12Z")

</div>

Hello,

in order to automate the pull request via ansible-pull, I need to have some credentials stored somewhere for ansible.  
The Repository is just reachable via HTTPS. Therefore Username and Password is needed.  
But after each ansible-pull I need to re-type the username and passwort again.

Has anybody any idea how to solve this and to automate this?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Pshem\_Kowalczyk](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@Pshem\_Kowalczyk](https://forum.ansible.com/u/Pshem_Kowalczyk)\
**Post date:** [July 6, 2018, 3:45am UTC](https://forum.ansible.com/t/avoid-typing-the-credentials-for-ansible-pull-all-the-time/27965/2 "2018-07-06T03:45:28Z")

</div>

One way would be to use read-only ssh keys and ssh instead of HTTPS access to your repo. Just copy the key onto your newly created machine as part of the bootstrap process.

kind regards  
Pshem

---

<div class="post-metadata">

**Author:** ![Maik\_Brauer](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Maik\_Brauer](https://forum.ansible.com/u/Maik_Brauer)\
**Post date:** [July 6, 2018, 6:12am UTC](https://forum.ansible.com/t/avoid-typing-the-credentials-for-ansible-pull-all-the-time/27965/3 "2018-07-06T06:12:09Z")

</div>

What in case there are restrictions? For example Firewall rules to the GIT Target-Server? What when we would like to use certificates via HTTPS?  
So HTTPS is supported and it is working. But there must be any way to configure that in order to automate the process.

What can be done to operate this with the standard way via HTTPS?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Pshem\_Kowalczyk](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@Pshem\_Kowalczyk](https://forum.ansible.com/u/Pshem_Kowalczyk)\
**Post date:** [July 6, 2018, 11:11am UTC](https://forum.ansible.com/t/avoid-typing-the-credentials-for-ansible-pull-all-the-time/27965/4 "2018-07-06T11:11:41Z")

</div>

If you use HTTPS you have to follow the basic auth scheme and supply the username and password. I have not tried this, but you might be able to add the username and password like this to the URL:

[https://user:password@github.com/ansible/ansible.git](https://user:password@github.com/ansible/ansible.git)

kind regards  
Pshem
