部署与部署者失败

时间:2017-11-22 18:26:30

标签: php ssh deployment

我在部署使用部署程序时出现问题,这是我第一次使用任何部署工具。我的老师已经制定了一个指导方针,但是,我还没有能够进行部署。 所以,如果有人能告诉我我做错了什么,请告诉我。 这里遵循我的计算机和我的设置的所有规格:

计算机:

  

操作系统Windows 10 Home
  制片人ASUSTek Computer Inc.   型号E403SA
  处理器Intel(R)Pentium(R)CPU N3700 @ 1.60GHz 1.60 GHz   RAM 4.0 GB   64位操作系统,基于x64的处理器

.ssh / config file:

Host xxxxx
 ControlMaster no
 Hostname ssh.xxxxx.xx
 User xxxxxx_xxx

请注意,我添加了ControlMaster,因为我读过这个问题可能是ssh多路复用,但是我有同样的错误,有和没有它...

deploy.php文件(在项目的根目录中):

<?php
namespace Deployer;

require 'recipe/common.php';

// Project name
set('application', 'blog');

// Project repository
set('repository', 'git@github.com:xxxxxxx/xxxxxxxxxxxxxxxx.git');

// [Optional] Allocate tty for git clone. Default value is false.
set('git_tty', true); 

// Shared files/dirs between deploys 
set('shared_files', ['config/dbinfo.json']);
set('shared_dirs', []);

// Writable dirs by web server 
set('writable_dirs', []);


// Hosts

host('ssh.xxxxxx.xx')
    ->set('deploy_path', '~/xxxx.xxxxxxxxxxxxx.xxxx.xxxxxxx')
    ->user('xxxxxx_xxx')
    ->port(22);    


// Tasks

desc('Deploy your project');
task('deploy:custom_webroot', function() {
    run("cd {{deploy_path}} && ln -sfn {{release_path}} public_html/xxxxxxxxxxxx");
});
task('deploy', [
    'deploy:info',
    'deploy:prepare',
    'deploy:lock',
    'deploy:release',
    'deploy:update_code',
    'deploy:shared',
    'deploy:writable',
    'deploy:clear_paths',
    'deploy:symlink',
    'deploy:unlock',
    'cleanup',
    'success'
]);

// [Optional] If deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
after('deploy', 'deploy:custom_webroot');

当我尝试在项目的根目录中运行dep deploy时,我得到流动的输出:

$ dep deploy
✈︎ Deploying master on ssh.xxxxxx.xx
➤ Executing task deploy:prepare
✔ Executing task deploy:failed
➤ Executing task deploy:unlock


  [Deployer\Exception\RuntimeException]                                         
  The command "rm -f ~/blog.xxxxxxxxxxx.xxxx.xxxxx/.dep/deploy.lock" failed.
  Exit Code: -1 (Unknown error)                                                 
  Host Name: ssh.xxxxx.xx                                                      
  ================                                                              
  mm_send_fd: sendmsg(2): Broken pipe                                           
  mux_client_request_session: send fds failed                                   

任何帮助都会非常感激!

0 个答案:

没有答案