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

gulp-prompt prevents use of sftp #80

Open
sbsrouteur opened this issue Oct 28, 2020 · 0 comments
Open

gulp-prompt prevents use of sftp #80

sbsrouteur opened this issue Oct 28, 2020 · 0 comments

Comments

@sbsrouteur
Copy link

When using gulp-prompt in a pipe to query a privatekey pasword before sending to gulp-ftp, sftp hangs (happens with all sftp clients I tried gulp-ftp, gulp-sftp-up5, gulp-ssh). (see ).

Use sample is :
`
gulp.task('deploy-test', function () {

sftpOptions = {
host: 'host',
port: 22,
remotePath: '/var/www/Test/',
key: {
location: "private.key",
passphrase: '12345'
},
buffer:false,
username:"webuser",

};
res = gulp.src(['./.php', './dist/**/','./ws/**/*'],{base: './'})
.pipe(prompt.prompt({
type: 'password',
name: 'pass',
message: 'Please enter your password'
}, function(res){
sftpOptions.key.passphrase=res.pass;
}))
.pipe(sftp(sftpOptions));
return res;
});`

When doing so, the ftp will sort of start then hang. Removing the call to prompt and all works properly again.
How is one supposed to call prompt for such a use case?

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

1 participant