My question is that I want to copy a specific file from private git repository to remote server with ansible but I don't want to use ssh key. Do you know any alternative way like such as with api key? Like below code sample Im getting permission issue, so I want to add api key or sth else to get repo file.
---
- name: Sample
hosts: localhost
connection: local
become: true
tasks:
- name: Copy
become: yes
git:
repo: 'https://gitlab.com/sample-project/branch-a/sample.xml'
dest: "/home/sample-file"