This isn't actually as simple as that. It's because the git command needs to be run under a user that has write permission to the directory, and since apache's user doesn't have write access, the whole thing fails. The server actually has all this, but it's outside the scope of the script (i.e. in external user settings) so it's not in this repo.