Jim*_*ire 8 git shared-hosting bluehost
我有一个来自Github的git pull web hook,两个遥控器,GoDaddy [生产]和Bluehost [staging].这个问题不是关于那些公司本身,而是可能是设置差异的原因.我有这个脚本,我在github.com上设置为post commit hook:
<?php
$output = shell_exec('git pull origin master');
echo "<pre>$output</pre>";
?>
Run Code Online (Sandbox Code Playgroud)
当我提交Github仓库时,钩子会在Bluehost上启动并正常工作.它对Godaddy没有任何作用.
Bluehost浏览器响应:
"already up to date". Pull command works, and the Bluehost repo is updated.
Run Code Online (Sandbox Code Playgroud)
Godaddy浏览器响应:
<pre></pre> Pull command has not worked. Repo not updated.
Run Code Online (Sandbox Code Playgroud)
当我通过浏览器运行此脚本时:
<?php
$output = shell_exec('ls');
echo "<pre>$output</pre>";
?>
Run Code Online (Sandbox Code Playgroud)
我在两台服务器上都获得了正确的'ls'目录输出.
当我通过SSH进入目录时,我可以手动发出命令'git pull origin master',它可以在两台服务器上运行.那么这只是意味着Godaddy允许PHP发出一些命令,而不是其他命令吗?我能以某种方式修复此问题吗?没有人会自动部署到Godaddy中,这是不正确的!
| 归档时间: |
|
| 查看次数: |
414 次 |
| 最近记录: |