I'm using a gulp task to upload my built files to a web server with the gulp-sftp plugin. However, I'm now getting an error since basic authentication was added to the remotePath directory on the test site (in the form of an .htaccess file).
Here's my gulp task:
gulp.task('upload', function() {
gulp.src('./build/**/*')
.pipe(sftp({
host: 'example.com',
auth: 'keyMain',
remotePath: '/var/www/dest',
callback: uploadComplete
}));
});
And here is the error I'm now getting when I run the same task:
[13:42:34] Authenticating with password.
[13:42:35] SFTP error or directory exists: Error: Failure /var/www/dest
events.js:85
throw er; // Unhandled 'error' event
^
Error: Permission denied
at SFTP._parse (...)
...
The SFTP credentials differ from the Basic AuthType ones and my .ftppass file only contains the SFTP credentials.
Here's what my .ftppass file looks like:
{
"keyMain": {
"user": "<my SFTP username>",
"pass": "<my SFTP password>"
}
}
I'm thinking I need to pass through the Basic AuthType credentials to fix this error. Can anyone help?
Cheers :)
PS: I'm using:
- Mac OS X 10.11.1
- Node v0.12.7
- Gulp CLI version 3.9.0
- gulp-sftp ^0.1.5
Aucun commentaire:
Enregistrer un commentaire