Easily the most difficult problem to diagnose that I have EVER experienced. I seem to be unable to call:
exec('call git pull', $output);
exec('call git status', $output); //works fine
I faced the same problem today and used Process Monitor to see what was going on and found that for some reasons
sh.exe looked for the keys in
C:\Windows\SysWOW64\config\systemprofile\.ssh. So I copied everything in
C:\Users\Administrator\.ssh to that folder and it worked perfectly.