Using Gulp-SFTP with Pageant (on Windows)

I tried multiple ways, pointing directly to the keyfile, etc. – everything fails or was not very practical.

But it’s hell simple. See: https://github.com/mscdex/ssh2#client-methods

You simply have to do it this way:

gulp.task('sftp-upload', function () {
    return gulp.src('css/*')
        .pipe(sftp({
            host: 'example.com',
            user: 'john.doe',
            agent: 'pageant',
            agentForward: true,
            remotePath: '/var/www/vhosts/xy/httpdocs/projectfolder'
        }));
});

So this should also work with other gulp ssh / sftp plugins based on the SSH2 client for node.js.

    Schreibe einen Kommentar

    Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert


    The reCAPTCHA verification period has expired. Please reload the page.