From fe4dd4201a8e4d91c9126d40141c8ff0903c4547 Mon Sep 17 00:00:00 2001 From: Michael Erkens Date: Mon, 27 Nov 2017 11:14:30 +0100 Subject: [PATCH] permission denied for the git working direcotry When using the "become" option in a host configuration, the work directory for git needs to be accesible for that user. For example, the homedirectory from the user I use to SSH isn't readable for the user I use to deploy, so it fails with a "permission denied". (also make sure to set the HOME enviroment variable so the correct git configuation can be read if needed) --- recipe/deploy/update_code.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipe/deploy/update_code.php b/recipe/deploy/update_code.php index 8f264519..d5a0bced 100644 --- a/recipe/deploy/update_code.php +++ b/recipe/deploy/update_code.php @@ -76,7 +76,8 @@ task('deploy:update_code', function () { $depth = ''; } } - + + cd('{{deploy_path}}'); if ($gitCache && has('previous_release')) { try { run("$git clone $at $recursive -q --reference {{previous_release}} --dissociate $repository {{release_path}} 2>&1", $options);