deploy authKey ftppass
I receive this errors via grunt-sftp-deploy --verbose
I'm just started with grunt, just need to upload the watch css generated via sass to a certain point on a server.
Registering "grunt-sftp-deploy" local Npm module tasks.
Reading
***************publicgruntnode_modulesgrunt-sftp-deploypackage.json...OK
Parsing
***************gruntnode_modulesgrunt-sftp-deploypackage.json...OK
Loading "sftp-deploy.js" tasks...OK
+ sftp-deploy
Loading "Gruntfile.js" tasks...OK
+ default
Running tasks: sftp-deploy
Running "sftp-deploy" task
Running "sftp-deploy:build" (sftp-deploy) task
Verifying property sftp-deploy.build exists in config...OK
Files: ../css -> /server/path
**Warning: .ftppass seems to be missing or incomplete Used --force, continuing.**
>> Concurrency : 4
Connection :: connect
**>> Error: Timed out while waiting for handshake
Fatal error: Connection :: error**
So then the gruntfile.js looks like that
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
'sftp-deploy': {
build: {
auth: {
host: 'XXX.XXX.XXX.XXX',
port: 22,
authKey: 'key1'
},
cache: 'sftpCache.json',
src: '../css',
dest: '/server/path',
exclusions: [
],
serverSep: '/',
concurrency: 4,
progress: true
}
},
sass: {
dist: {
options: {
style: 'expanded',
noCache: true
},
files: [{
expand: true,
cwd: '../sass/pages',
src: ["**/*.scss"],
dest: '../css',
ext: ".css"
}]
}
},
watch: {
options: {
nospawn: true,
nocache: true,
livereload: true
},
sass: {
files: ['../sass/**/*.scss'],
tasks: ['sass']
},
sftp: {
files: ['../css/**/*.css'],
tasks: ['sftp-deploy']
}
}
});
grunt.loadNpmTasks('grunt-sftp-deploy');
grunt.registerTask('default', ['watch']);
};
Sass is right but i can't find why is not uploading the file to the server.
Then my question is:
What i'm missing? Which is the path in where is supposed to be the .ftppass.json? Right now is the same place as the gruntfile.js but i'm having problems with it as well and i'm suspecting that is not right. but there is no room to set up the .ftppass.json in the sftp-deploy gruntfile.js settings. How do i set up the path correctly?
.ftppass.json
{
"key1": {
"username": "username",
"password": "pass"
}
}
It is just .ftppass
WITHOUT the .json in the end. Placing it in the same directory as your Gruntfile.js will do it
上一篇: sass和咕噜声
下一篇: 部署authKey ftppass