# How do we mask account and access token of github on the src are written in requirements.yml file?

**URL:** <https://forum.ansible.com/t/how-do-we-mask-account-and-access-token-of-github-on-the-src-are-written-in-requirements-yml-file/2533>\
**Category:** Get Help\
**Created:** [November 23, 2023, 4:15am UTC](https://forum.ansible.com/t/how-do-we-mask-account-and-access-token-of-github-on-the-src-are-written-in-requirements-yml-file/2533 "2023-11-23T04:15:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lanhnguyen](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@lanhnguyen](https://forum.ansible.com/u/lanhnguyen)\
**Post date:** [November 23, 2023, 4:15am UTC](https://forum.ansible.com/t/how-do-we-mask-account-and-access-token-of-github-on-the-src-are-written-in-requirements-yml-file/2533/1 "2023-11-23T04:15:57Z")

</div>

Hi everyone,  
Do you know how do we mask account and access token of github on the src are written in requirements.yml file?

```auto
---
- name: test
  src: https://user_name:personnal_access_token@github.com/.../ansible-test.git
  version: main  
  scm: git

```

---

<div class="post-metadata">

**Author:** ![tanganellilore](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tanganellilore/32/178_2.png) [@tanganellilore](https://forum.ansible.com/u/tanganellilore)\
**Post date:** [November 23, 2023, 6:47am UTC](https://forum.ansible.com/t/how-do-we-mask-account-and-access-token-of-github-on-the-src-are-written-in-requirements-yml-file/2533/2 "2023-11-23T06:47:18Z")

</div>

Hi,  
Thi is not required with ansible and awx.

If repo is private and you use command line, will be prompt ed the Username and password/token.

If you use AWX, it use the source credential to download repo.  
One limitation in awx is that you have only one source credential, so the same credential it’s used to access on all roles/Collection (if thery require authentication).

---

<div class="post-metadata">

**Author:** ![ptn](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ptn/32/481_2.png) [@ptn](https://forum.ansible.com/u/ptn)\
**Post date:** [November 23, 2023, 12:16pm UTC](https://forum.ansible.com/t/how-do-we-mask-account-and-access-token-of-github-on-the-src-are-written-in-requirements-yml-file/2533/3 "2023-11-23T12:16:00Z")

</div>

In addition to @tanganellilore message, you usually don’t manage credentials here; you could use [git helper to store credentials](https://git-scm.com/docs/git-credential-store) (not recommended as creds are stored unencrypted on disk. Also more info [here](https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage)), or better, use ssh to access your private repos, and manage connections in ssh client configuration:

```plaintext
# ~/.ssh/config

Host github.com
  IdentityFile /my/private/keyfile/path
  PreferredAuthentications publickey

```

Then push the corresponding public key to your Github account.

If you defined a passphrase on your private key, then better use an ssh agent as well to avoid being bothered decrypting your key everytime you use it, but that’s a matter for another time.

Anyways, Ansible will pickup on this underlying config. It goes the same for all ssh config FYI.

Edit: Forgot to say, but you’ll have to use the appropriate URL in your requirements.yml file to reflect this change; something like this: `git@github.com:<yourUserName>/<yourRepoPath>.git`.
