Reputation: 46
I'm trying to add, commit & push to github using php code from Laravel controller using:
shell_exec('git add . && git commit -m "Nero" && git push origin master');
system('git add . && git commit -m "Nero" && git push origin master');
I tried a lot of commands and it successfully run, the problem is in
git push
git push origin master
Upvotes: 0
Views: 558
Reputation: 93
Are you sure your git credentials are correctly configured? My guess is that the push command is waiting for you to enter your Github username/password.
You could verify by getting the shell_exec output like this:
$output = shell_exec('git add . && git commit -m "Nero" && git push origin master');
Upvotes: 1