我有一个脚本在PHP中运行以下shell_exec cmd。Git POST webhook shell_exec
echo shell_exec('cd /var/www/Library/Laravel/ ; git pull bitbucket master ; 2>&1');
这是由一个网络挂接服务叫了,我想要做的就是切断其在此开发环境每次我们推到拉。
但是,在调用此路由时,我不会收到任何输出错误或任何内容。任何人都可以提出为什么这可能是?
我从error_log中这呼应 - >
error: cannot open .git/FETCH_HEAD: Permission denied
我加入了Apache用户与git,现在我得到以下错误
Could not create directory '/var/www/.ssh'.
Host key verification failed.
fatal: The remote end hung up unexpectedly