# Need help with ansible-playbook "git" module

**URL:** <https://forum.ansible.com/t/need-help-with-ansible-playbook-git-module/27995>\
**Category:** Ansible Developer\
**Created:** [July 9, 2018, 3:05pm UTC](https://forum.ansible.com/t/need-help-with-ansible-playbook-git-module/27995 "2018-07-09T15:05:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_Satal](https://avatars.discourse-cdn.com/v4/letter/r/b4bc9f/32.png) [@Rahul\_Satal](https://forum.ansible.com/u/Rahul_Satal)\
**Post date:** [July 9, 2018, 3:05pm UTC](https://forum.ansible.com/t/need-help-with-ansible-playbook-git-module/27995/1 "2018-07-09T15:05:29Z")

</div>

I have to clone a git repository in 10 remote servers. Firstly, I want to know that do I need to install git on all the 10 servers or only on local system. Second is I am getting this error - “stderr”: “fatal: could not create leading directories of ‘/opt/rahul/nemp-scripts’: Permission denied\n” when I am trying to clone a repo in a remote server in which git is already installed.

My code looks like below -

tasks:

- name: Clone bitbucket repo  
git:  
repo: ssh://git@git.xyz.git  
dest: /opt/rahul/nemp-scripts  
version: master  
accept\_hostkey: yes  
key\_file: /home/rahul/.ssh/id\_rsa

Any help is appreciated

Thanks

---

<div class="post-metadata">

**Author:** ![rhysmeister](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rhysmeister/32/10599_2.png) [@rhysmeister](https://forum.ansible.com/u/rhysmeister)\
**Post date:** [July 9, 2018, 3:32pm UTC](https://forum.ansible.com/t/need-help-with-ansible-playbook-git-module/27995/2 "2018-07-09T15:32:54Z")

</div>

You have a permissions issue. Check the user has permissions to write to the path you have chosen.
