Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload() with non-standard SSH port fails #1218

Closed
lbausch opened this issue May 18, 2017 · 1 comment
Closed

upload() with non-standard SSH port fails #1218

lbausch opened this issue May 18, 2017 · 1 comment
Labels

Comments

@lbausch
Copy link

lbausch commented May 18, 2017

Q A
Issue Type Bug
Deployer Version 5.0.0
Local Machine OS Debian
Remote Machine OS Debian

Description

When calling upload()rsync fails because it tries to connect via port 22

Steps to reproduce

Content of deploy.php

<?php

namespace Deployer;

require 'recipe/common.php';

// Configuration
set('repository', '[email protected]');
set('git_tty', false); // [Optional] Allocate tty for git on first deployment
set('shared_files', []);
set('shared_dirs', []);
set('writable_dirs', []);
set('allow_anonymous_stats', true);

// Hosts
host('myhost')
    ->stage('production')
    ->user('myuser')
    ->port(12345)
    ->set('deploy_path', '/var/www');


// Tasks
task('deploy:build_ref', function () {
    writeln('<info>Uploading BUILD_REF file</info>');
    upload('./BUILD_REF', '{{release_path}}/BUILD_REF');
})->desc('Upload BUILD_REF file');

task('deploy', [
    'deploy:prepare',
    'deploy:lock',
    'deploy:release',
    'deploy:update_code',
    'deploy:shared',
    'deploy:build_ref',
    'deploy:writable',
    //'deploy:vendors',
    'deploy:clear_paths',
    'deploy:symlink',
    'deploy:unlock',
    'cleanup',
    'success',
])->desc('Deploy project');

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

Output log

[Symfony\Component\Process\Exception\ProcessFailedException]                 
  The command "rsync -azP  ./BUILD_REF myuser@myserver:/var/www/releases/4/BUILD_REF" failed.                                           
  Exit Code: 255(Unknown error)                                                
  Working directory: /home/depoyer/     
  Output:                                                                      
  ================                                                             
  Error Output:                                                                
  ================                                                             
  ssh: connect to host myserver port 22: Connection refused        
  rsync: connection unexpectedly closed (0 bytes received so far) [sender]     
  rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.6]        
@antonmedv antonmedv added the bug label May 18, 2017
@antonmedv
Copy link
Member

Fixed. Please check master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants