Easily the most difficult problem to diagnose that I have EVER experienced. I seem to be unable to call:
exec('call git pull', $output);
The process hangs and tends to take IIS with it.
exec('call git status', $output); //works fine
Here's what I've done:
- Generated RSA key added to github (passcode is blank)
- Everyone has permission on
mysite/.git/, andProgram Files/git/binandcmd.exe - Tried the ssl cert fix mentioned in other posts with 'slash' issue
- Tried using https:// instead of SSH
- Tried piping to stderr
2>NULand2>&1
Clearly, there's a permissions issue where exec calls cmd.exe which in turn calls git.exe, which in turn calls sh.exeto connect to github, which in turn makes use of git-pull and possibly git-send-packand GOD KNOWS what else.
I'm guessing 'sh.exe' determines the current user is IUSR and cannot find the RSA key to authenticate with.
If I could figure out how to ssh-keygen the IUSR account, I would have tried that.
If I could figure out how to exec git bash instead of git (via cmd.exe) I would have tried that.
Here's the question in it's simplest form:
How do I pull from my github repo via PHP's exec method?
The problem certainly seems to be with SSH, but I'm totally at the end of everything to try.
Help!
call git pullinstead ofgit pullonly?