Deployer: Use Deployer on Windows

Created on 14 Dec 2016  路  9Comments  路  Source: deployphp/deployer

| Q | A
| ----------------- | ---
| Issue Type | Bug
| Deployer Version | 4.0.2
| Local Machine OS | Windows
| Remote Machine OS | Debian

Description

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).

Content of deploy.php

namespace 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');

Output log

$ 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                          

Most helpful comment

I'm going to write docs about how to use deployer on windows.

All 9 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

antonmedv picture antonmedv  路  5Comments

osbulbul picture osbulbul  路  3Comments

khoanguyen96 picture khoanguyen96  路  5Comments

krve picture krve  路  4Comments

dima-stefantsov picture dima-stefantsov  路  4Comments