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

Timed out while waiting for handshake #64

Open
mig-25 opened this issue Oct 29, 2016 · 2 comments
Open

Timed out while waiting for handshake #64

mig-25 opened this issue Oct 29, 2016 · 2 comments

Comments

@mig-25
Copy link

mig-25 commented Oct 29, 2016

I have setup a gulp task with gulp-sftp and have tried two sites to connect to it without success. I have tried both sites with Filezilla and both are connecting.

My task is the following:

var sftp = require('gulp-sftp');        
gulp.task('sftp', function () {
        return gulp.src('dist/**/*')
            .pipe(sftp({
                host: 'waws-prod-sn1-015.ftp.azurewebsites.windows.net',
                user: 'fwd16\$fwd16',
                pass: 'xxxxxx',
                remotePath: '/site/wwwroot'
            }));
    });

The respond I am getting is the following:

bash-3.2$ gulp sftp                                                                                                                            
[22:29:18] Using gulpfile ~/Desktop/gulp-starter-csstricks/gulpfile.js                                                                         
[22:29:18] Starting 'sftp'...                                                                                                                  
[22:29:18] Authenticating with password.                                                                                                       
[22:29:28] 'sftp' errored after 10 s                                                                                                           
[22:29:28] Error in plugin 'gulp-sftp'                                                                                                         
Message:                                                                                                                                       
    Timed out while waiting for handshake                                                                                                      
Details:                                                                                                                                       
    level: connection-timeout                                                                                                                  
[22:29:28] gulp-sftp SFTP abrupt closure                                                                                                       
[22:29:28] Connection :: close

I would prefer to use the auth method, as I prefer not to expose the user and pwd in the gulp file and I add the .ftppass to my .gitignore.

If I add the user and pwd in my .ftppass file and change the task to the following:

gulp.task('sftp', function () {
    return gulp.src('dist/**/*')
        .pipe(sftp({
            host: 'waws-prod-sn1-015.ftp.azurewebsites.windows.net',
            authFile:'.ftppass',
            auth: 'keyMain',
            remotePath: '/site/wwwroot'
        }));
}); 

I get the following error:

bash-3.2$ gulp sftp                                                                                                                            
[22:22:55] Using gulpfile ~/Desktop/gulp-starter-csstricks/gulpfile.js                                                                         
[22:22:55] Starting 'sftp'...                                                                                                                  
[22:22:55] 'sftp' errored after 7.52 ms                                                                                                        
[22:22:55] SyntaxError: Unexpected token $ in JSON at position 36                                                                              
    at Object.parse (native)                                                                                                                   
    at module.exports (/Users/sohail/Desktop/gulp-starter-csstricks/node_modules/gulp-sftp/index.js:33:25)                                     
    at Gulp.<anonymous> (/Users/sohail/Desktop/gulp-starter-csstricks/gulpfile.js:86:15)                                                       
    at module.exports (/Users/sohail/Desktop/gulp-starter-csstricks/node_modules/orchestrator/lib/runTask.js:34:7)                             
    at Gulp.Orchestrator._runTask (/Users/sohail/Desktop/gulp-starter-csstricks/node_modules/orchestrator/index.js:273:3)                      
    at Gulp.Orchestrator._runStep (/Users/sohail/Desktop/gulp-starter-csstricks/node_modules/orchestrator/index.js:214:10)                     
    at Gulp.Orchestrator.start (/Users/sohail/Desktop/gulp-starter-csstricks/node_modules/orchestrator/index.js:134:8)                         
    at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:20                                                                                     
    at _combinedTickCallback (internal/process/next_tick.js:67:7)                                                                              
    at process._tickCallback (internal/process/next_tick.js:98:9)                                                                              
    at Module.runMain (module.js:592:11)                                                                                                       
    at run (bootstrap_node.js:394:7)                                                                                                           
    at startup (bootstrap_node.js:149:9)                                                                                                       
    at bootstrap_node.js:509:3

Anyone understand what I missing in my code?

@jing2si
Copy link

jing2si commented Aug 25, 2017

try set options.timeout a long time.

@ghost
Copy link

ghost commented Aug 30, 2017

timeout: 99999999999999

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

No branches or pull requests

2 participants