Невозможно отправить файлы git push с общего хостинга на Github через phpshell_exec() ⇐ Php
Невозможно отправить файлы git push с общего хостинга на Github через phpshell_exec()
I try to push files from my shared hosting with cPanel to Github using the following PHP code:
ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $push = shell_exec('git push -u origin master'); if($push === null) { echo "Error executing git push command"; } else { echo "$push"; } but I get the first echo i.e. "Error executing git push command" and don't get any php error to know what's the reason of the problem.
I added and committed files before that via cPanel's Terminal successfully.
And if I run git push -u origin master in the Terminal and enter my Github personal token, I can push files successfully too.
The command git status is executed in PHP shell_exec() successfully.
Источник: https://stackoverflow.com/questions/781 ... shell-exec
I try to push files from my shared hosting with cPanel to Github using the following PHP code:
ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); $push = shell_exec('git push -u origin master'); if($push === null) { echo "Error executing git push command"; } else { echo "$push"; } but I get the first echo i.e. "Error executing git push command" and don't get any php error to know what's the reason of the problem.
I added and committed files before that via cPanel's Terminal successfully.
And if I run git push -u origin master in the Terminal and enter my Github personal token, I can push files successfully too.
The command git status is executed in PHP shell_exec() successfully.
Источник: https://stackoverflow.com/questions/781 ... shell-exec
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение