# git pull failing without error

**URL:** <https://forum.ansible.com/t/git-pull-failing-without-error/19967>\
**Category:** Ansible Project\
**Created:** [December 8, 2015, 11:23pm UTC](https://forum.ansible.com/t/git-pull-failing-without-error/19967 "2015-12-08T23:23:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scot\_Hacker](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Scot\_Hacker](https://forum.ansible.com/u/Scot_Hacker)\
**Post date:** [December 8, 2015, 11:23pm UTC](https://forum.ansible.com/t/git-pull-failing-without-error/19967/1 "2015-12-08T23:23:19Z")

</div>

Using ansible 1.9.4, the git checkout task below was working for me up until a few days ago:

- name: “Update from git repo”  
git:  
repo: “[git@github.com](mailto:git@github.com):mine/foo.git”  
dest: “/some/path”  
version: “dev”  
accept\_hostkey: yes  
key\_file: “/some/path/.ssh/id\_rsa”

Now, all of a sudden it is failing:

failed: [domain.edu] =\> {“failed”: true}

msg: Failed to checkout branch dev

FATAL: all hosts have already failed – aborting

Clearly something has changed but I’m not sure what. However, the error is so vague I’ve got no clue how to debug. And when I run my playbook with -vvvv I still don’t get anything useful.

The branch name has not changed, and as root on the host, I can “git pull” just fine. And if I do update it manually, ansible still can’t get past this task. I do notice that verbose output seems to report the repo var as empty:

REMOTE\_MODULE git version=dev key\_file=/var/www/.ssh/id\_rsa dest=/opt/portal repo=

Even though it’s not. Is there any other way to get useful troubleshooting info here? Clues?

Thanks.

---

<div class="post-metadata">

**Author:** ![Scot\_Hacker](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Scot\_Hacker](https://forum.ansible.com/u/Scot_Hacker)\
**Post date:** [December 15, 2015, 12:02am UTC](https://forum.ansible.com/t/git-pull-failing-without-error/19967/2 "2015-12-15T00:02:40Z")

</div>

Still not sure what was going on with this or why I couldn’t get useful debug info on the problem, but finally rewrote the task as a simple command: block rather than a git: block:

`

- name: “Update code from git repo”  
command: “git pull chdir={{ project\_root }}”  
tags:
- “git”
- “simple”  
`

which works fine. Odd.

./s
