Cannot clone private bitbucket repo through ansible
<p>I have the following configurations in ansible.cfg</p>

<pre><code>sudo_flags = -H -S -n
[ssh_connection]
ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s -o ForwardAgent=yes

- name: Fetch code from git repo
  git:  repo={{repo_url}}
        dest={{ proj_path }}
        version={{ repo_version }}
        accept_hostkey=yes
        force=true
</code></pre>

<p>Keep in mind that I also have same tasks that run as sudo before this one</p>

<p>The error message is:</p>

<pre><code>Warning: Permanently added the RSA host key for IP address '2401:1d80:1010::150' to the list of known hosts.\r\nPermission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.", "rc": 128, "stderr": "Warning: Permanently added the RSA host key for IP address '2401:1d80:1010::150' to the list of known hosts.\r\nPermission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n", "stdout": "", "stdout_lines": []}
</code></pre>