我正在为我的Django项目使用BitBucket,为云服务器使用EC2。我的目标是当我将提交推送到分支时,BitBucket将在钩子上进行调用,钩子将更新EC2中的代码。
到目前为止,当我提交时,会调用钩子,但代码不会在服务器上更新。根据我的理解,这与Linux / Ubuntu 14.04中的权限有关。
我尝试按照Brandon Summers中的链接进行操作,并通过here进一步完善相同的内容。但它仍然无效。
使用第一个链接,我在日志中得到了这个:
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
chmod: cannot access '.git': No such file or directory
[Thu Jul 30 18:21:05.106127 2015] [:error] [pid 9736] [client 131.103.20.165:42727] PHP Notice: Undefined property: Deploy::$_data in /var/www/html/deploy_home.php on line 127
第二个链接在控制台中给我这个:
[Sat Aug 01 15:26:35.000824 2015] [:error] [pid 2447] [client 131.103.20.165:39102] PHP Warning: file_put_contents(/var/log/deploy/deployments.log): failed to open stream: No such file or directory in /var/www/html/deploy_repo.php on line 144
[Sat Aug 01 15:26:35.000869 2015] [:error] [pid 2447] [client 131.103.20.165:39102] PHP Warning: chmod(): No such file or directory in /var/www/html/deploy_repo.php on line 147
[Sat Aug 01 15:26:35.000924 2015] [:error] [pid 2447] [client 131.103.20.165:39102] PHP Warning: file_put_contents(/var/log/deploy/deployments.log): failed to open stream: No such file or directory in /var/www/html/deploy_repo.php on line 152
[Sat Aug 01 15:26:35.001010 2015] [:error] [pid 2447] [client 131.103.20.165:39102] PHP Warning: file_put_contents(/var/log/deploy/deployments.log): failed to open stream: No such file or directory in /var/www/html/deploy_repo.php on line 144
[Sat Aug 01 15:26:35.001034 2015] [:error] [pid 2447] [client 131.103.20.165:39102] PHP Warning: chmod(): No such file or directory in /var/www/html/deploy_repo.php on line 147
[Sat Aug 01 15:26:35.001068 2015] [:error] [pid 2447] [client 131.103.20.165:39102] PHP Warning: file_put_contents(/var/log/deploy/deployments.log): failed to open stream: No such file or directory in /var/www/html/deploy_repo.php on line 152
sh: 1: /usr/sbin/sendmail: not found
第二个链接的控制台输出与无法写入日志文件有关,但EC2上的repo文件夹仍保持不变。
我在这里缺少什么?