1

I'm trying to use chef to check out a git repo to a windows client node.

This seems simple enough and I've got the following resource definition:

git "C:\\pathtocheckout" do
    repo "https://gitserver/repo.git"
    action [ :checkout, :sync]
end

But when this is reached by chef-client I get:

Errno::EIO: git[C:\pathtocheckout] (cookbook_name::test line 21) had an error: Errno::EIO: Input/output error - CreateProcessW

I've had a look at the stacktrace produced and it appears to be something to do with creating a process to run the git command - but this is the limit of my knowledge.

I've made sure git is installed on on Path, removed all other recipes from the run list, running as a different admin user and I've tried different repositories but all with the same error.

So I'm pretty stumped - anyone got a way I can dig into this error and see what is going on?

  • possible duplicate of [Ruby on Linux PTY goes away without EOF, raises Errno::EIO](http://stackoverflow.com/questions/10238298/ruby-on-linux-pty-goes-away-without-eof-raises-errnoeio) – sethvargo Jul 08 '14 at 14:34
  • 1
    @sethvargo I don't know if it is a duplicate but it lead me to an answer - the second to last comment [here](https://github.com/nevir/groc/issues/73) is the problem. Specifically `From what I recall it has something to do with how Windows executables work, as it has to be a .cmd or .exe file and since most commonly one is trying to exec a script, Windows will not treat it as an executable.` I've created my own provider that includes `git.exe` rather than just `git` and it fixes it. – user2371784 Jul 09 '14 at 14:22

0 Answers0