| Q | A
| ----------------- | ---
| Issue Type | Bug
| Deployer Version | 4.0.2
| Local Machine OS | Windows
| Remote Machine OS | Debian
I can't deploy my Symfony app from my Windows computer. I'm using Git Bash UI because it has SSH protocol (as the Windows CLI doesn't).
deploy.phpnamespace Deployer;
require 'recipe/symfony.php';
// Configuration
set('ssh_type', 'native');
set('repository', 'https://user:[email protected]/myrepository/myproject.git');
set('shared_files', ['app/config/parameters.yml', 'web/.htaccess']);
set('shared_dirs', ['app/logs', 'web/uploads', 'web/media', 'vendor']);
set('writable_dirs', ['app/cache', 'app/logs']);
// Servers
server('preprod', 'XX.XX.XX.XX')
->user('username')
->configFile('C:\Users\user\.ssh\config')
->set('deploy_path', '/var/www/directory/www');
$ php deployer.phar deploy preprod -vvv
脭脳帽 Executing task 鈫怺32mdeploy:prepare鈫怺39m
[preprod] 鈫怺31m>鈫怺39m echo $0
[preprod] 鈫怺1;30m< bash鈫怺0m
[preprod] 鈫怺31m>鈫怺39m if [ ! -d /var/www/directory/www ]; then mkdir -p /var/www/directory/www; fi
[preprod] 鈫怺31m>鈫怺39m if [ ! -L /var/www/directory/www/current ] && [ -d /var/www/directory/www/current ]; then echo true; fi
[preprod] 鈫怺31m>鈫怺39m cd /var/www/directory/www && if [ ! -d .dep ]; then mkdir .dep; fi
[preprod] 鈫怺31m>鈫怺39m cd /var/www/directory/www && if [ ! -d releases ]; then mkdir releases; fi
[preprod] 鈫怺31m>鈫怺39m cd /var/www/directory/www && if [ ! -d shared ]; then mkdir shared; fi
鈫怺32m脭脟贸鈫怺39m done on [preprod]
鈫怺32m脭拢枚鈫怺39m Ok [5s 248ms]
脭脳帽 Executing task 鈫怺32mdeploy:lock鈫怺39m
[preprod] 鈫怺31m>鈫怺39m if [ -f /var/www/directory/www/.dep/deploy.lock ]; then echo 'true'; fi
[preprod] 鈫怺31m>鈫怺39m touch /var/www/directory/www/.dep/deploy.lock
脭脳帽 Executing task 鈫怺32mdeploy:failed鈫怺39m
鈫怺32m脭脟贸鈫怺39m done on [preprod]
鈫怺32m脭拢枚鈫怺39m Ok [1ms]
鈫怺37;41m 鈫怺39;49m
鈫怺37;41m [Symfony\Component\Process\Exception\ProcessFailedException] 鈫怺39;49m
鈫怺37;41m The command "ssh -A -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p "22" "[email protected]" "touch /var/www/directory/www/.dep/deploy.lock"" failed. 鈫怺39;49m
鈫怺37;41m Exit Code: 1(General error) 鈫怺39;49m
鈫怺37;41m Working directory: C:\wamp\www\repository 鈫怺39;49m
鈫怺37;41m Output: 鈫怺39;49m
鈫怺37;41m ================ 鈫怺39;49m
鈫怺37;41m Error Output: 鈫怺39;49m
鈫怺37;41m ================ 鈫怺39;49m
鈫怺37;41m touch: cannot touch 脭脟每/var/www/directory/www/.dep/deploy.lock脭脟脰: No such file or directory 鈫怺39;49m
鈫怺37;41m
I fix that problem, when use set('http_user', 'www-data');
I've added this, but it has no effect, still got the same error...
Try $ usermod username -g www-data
Again, this issue is closed with any support...
same issue, same env...
I'm going to write docs about how to use deployer on windows.
That would be great!
Any update on this @antonmedv ?
Now in process of rewriting docs. Will do.
Most helpful comment
I'm going to write docs about how to use deployer on windows.