# git clone is pointing to a local repo when is should point to an external

**URL:** <https://forum.ansible.com/t/git-clone-is-pointing-to-a-local-repo-when-is-should-point-to-an-external/19762>\
**Category:** Ansible Project\
**Created:** [November 13, 2015, 10:11pm UTC](https://forum.ansible.com/t/git-clone-is-pointing-to-a-local-repo-when-is-should-point-to-an-external/19762 "2015-11-13T22:11:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joel\_Bremson](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@Joel\_Bremson](https://forum.ansible.com/u/Joel_Bremson)\
**Post date:** [November 13, 2015, 10:11pm UTC](https://forum.ansible.com/t/git-clone-is-pointing-to-a-local-repo-when-is-should-point-to-an-external/19762/1 "2015-11-13T22:11:35Z")

</div>

> `
> 
> `Enter code here...`
> 
> - name: Git Clone
> 
> # Clone the local repo. Getting to github is tricky.
> 
> git: repo=[https://github.com/jbremson/SG\_ASP.git](https://github.com/jbremson/SG_ASP.git) dest=“{{ scheduler\_code }}” version=“rq” force=yes
> 
> - file: path=“{{ scheduler\_code }}” owner=“{{ scheduler\_user }}” recurse=yes
> 
> # What is scheduler\_code ? The repo is not getting picked up
> 
> TASK: [scheduler | Git Clone] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> \<[ec2-54-162-234-59.compute-1.amazonaws.com](http://ec2-54-162-234-59.compute-1.amazonaws.com)\> ESTABLISH CONNECTION FOR USER: root  
> \<[ec2-54-162-234-59.compute-1.amazonaws.com](http://ec2-54-162-234-59.compute-1.amazonaws.com)\> REMOTE\_MODULE git repo=[https://github.com/jbremson/SG\_ASP.git](https://github.com/jbremson/SG_ASP.git) dest=“/opt/speedgauge/scheduler/code” version=“rq” force=yes  
> \<[ec2-54-162-234-59.compute-1.amazonaws.com](http://ec2-54-162-234-59.compute-1.amazonaws.com)\> EXEC ssh -C -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=“/home/joel/.ansible/cp/%h-%r” -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 [ec2-54-162-234-59.compute-1.amazonaws.com](http://ec2-54-162-234-59.compute-1.amazonaws.com) /bin/sh -c ‘LANG=en\_US.UTF-8 LC\_CTYPE=en\_US.UTF-8 /usr/bin/python’  
> failed: [[ec2-54-162-234-59.compute-1.amazonaws.com](http://ec2-54-162-234-59.compute-1.amazonaws.com)] =\> {“cmd”: “/usr/bin/git ls-remote origin -h refs/heads/rq”, “failed”: true, “rc”: 128}  
> stderr: fatal: ‘/opt/speedgauge/sg\_repo’ does not appear to be a git repository  
> fatal: Could not read from remote repository.
> 
> Please make sure you have the correct access rights  
> and the repository exists.
> 
> msg: fatal: ‘/opt/speedgauge/sg\_repo’ does not appear to be a git repository  
> fatal: Could not read from remote repository.
> 
> Please make sure you have the correct access rights  
> and the repository exists.
> 
> FATAL: all hosts have already failed – aborting
> 
> `  
> I’m having a problem getting my git task to point to the external repo. Instead it tries to look in a local repo: /opt/speedgauge/sg\_repo

I want to pull from repo listed in the task. What am I doing wrong here?

Cheers,  
Joel
