I want to push a folder with data to an empty repository in atlassian Git stash. The repository is created via the rest api. The remote origin is set. When I enter
$ git push origin master
in the shell it works all fine. When I use the PHP interactive shell and enter
exec('git push origin master');
it also works. But when the code is called in my PHP file nothing happens. Of course the code is the same. I am in the right working directory (I change it with chdir()
before the shell_exec
). No errors are reported (even when error_reporting is set to E_ALL
) and when i set the output argument in the exec()
I get an empty array.
Can anyone help?