grunt-sftp-deploy
grunt-sftp-deploy copied to clipboard
Not uploading the file
Hi, I've set up everything correctly, and Terminal don't show any errors...
$ grunt sftp-deploy --verbose Initializing Command-line options: --verbose
Reading "Gruntfile.js" Gruntfile...OK
Registering Gruntfile tasks. Reading .ftppass...OK Parsing .ftppass...OK Initializing config...OK
Registering "grunt-contrib-less" local Npm module tasks. Reading /Users/username/Sites/project/node_modules/grunt-contrib-less/package.json...OK Parsing /Users/username/Sites/project/node_modules/grunt-contrib-less/package.json...OK Loading "less.js" tasks...OK
- less
Registering "grunt-sftp-deploy" local Npm module tasks. Reading /Users/username/Sites/project/node_modules/grunt-sftp-deploy/package.json...OK Parsing /Users/username/Sites/project/node_modules/grunt-sftp-deploy/package.json...OK Loading "sftp-deploy.js" tasks...OK
- sftp-deploy
Registering "grunt-contrib-watch" local Npm module tasks. Reading /Users/username/Sites/project/node_modules/grunt-contrib-watch/package.json...OK Parsing /Users/username/Sites/project/node_modules/grunt-contrib-watch/package.json...OK Loading "watch.js" tasks...OK
- watch
Loading "Gruntfile.js" tasks...OK
No tasks were registered or unregistered.
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 -> /wwwroot/xxx-practice-installation/xxx-practice-installation/base-install/css Reading .ftppass...OK
Logging in with username xxx Concurrency : 4 Connection :: connect Connection :: close false
Is everything ok when I see this in my console? I can not see that the file is upload to my fops server...? @thrashr888 Paul, can you help me with this please?
$ grunt sftp-deploy --verbose Initializing Command-line options: --verbose
Reading "Gruntfile.js" Gruntfile...OK
Registering Gruntfile tasks. Reading .ftppass...OK Parsing .ftppass...OK Initializing config...OK
Registering "grunt-contrib-less" local Npm module tasks. Reading /Users/xxx/Sites/project/node_modules/grunt-contrib-less/package.json...OK Parsing /Users/xxx/Sites/project/node_modules/grunt-contrib-less/package.json...OK Loading "less.js" tasks...OK
- less
Registering "grunt-sftp-deploy" local Npm module tasks. Reading /Users/xxx/Sites/project/node_modules/grunt-sftp-deploy/package.json...OK Parsing /Users/xxx/Sites/project/node_modules/grunt-sftp-deploy/package.json...OK Loading "sftp-deploy.js" tasks...OK
- sftp-deploy
Registering "grunt-contrib-watch" local Npm module tasks. Reading /Users/xxx/Sites/project/node_modules/grunt-contrib-watch/package.json...OK Parsing /Users/xxx/Sites/project/node_modules/grunt-contrib-watch/package.json...OK Loading "watch.js" tasks...OK
- watch
Loading "Gruntfile.js" tasks...OK
No tasks were registered or unregistered.
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 -> /wwwroot/xxx-practice-installation/xxx-practice-installation/base-install/css Reading .ftppass...OK
Logging in with username xxx Concurrency : 4 Connection :: connect Connection :: close false
have you checked #43 ?
Hi @maboiteaspam - Clément, I've already checked it. I've updated the npm, added the 'serevrSep' line (needless I think because I'm on mac) just in case without success. Thanks anyway!
Hello,
do you mean you also tried to set cache : false ?
Can you give some more detailed information ? Configuration, environments.
How about #58 ?
What happens if you try with --verbose ? or --debug ?
could you post that ?
HTH
Thanks for answering @maboiteaspam, I've also tried cache: false
My environment: Mac OS maverick,
FTP server: FTP-SSL (Explicit AUTH TLS), port 21...
I've read #58 and this is my code (Gruntfile.js):
module.exports = function(grunt) {
grunt.initConfig({
ftpaccess: grunt.file.readJSON('.ftppass'),
// running grunt less
will compile once
less: {
development: {
options: {
paths: ["css"],
sourcemap: "sourcemap/style.css.map"
},
files: {
"css/styles.css": "less/styles.less"
}
},
production: {
options: {
paths: ["css"],
cleancss: true
},
files: {
"css/style.min.css": "less/styles.less"
}
}
},
// running grunt less:ftp-deploy
will upload the files to the server
'sftp-deploy': {
build: {
auth: {
host: '<%= ftpaccess.host1 %>',
port: 21,
authKey: 'key1'
},
cache: false,
src: './css/',
dest: '/wwwroot/xxx-practice-installation/xxx-practice-installation/base-install/css/',
// exclusions: ['path/to/source/folder//.DS_Store', 'path/to/source/folder//Thumbs.db', 'path/to/dist/tmp'],
serverSep: '/',
progress: true
}
},
// running grunt watch
will watch for changes
watch: {
files: "less/*/.less",
tasks: ["less:development", "sftp-deploy"]
}
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-sftp-deploy');
grunt.loadNpmTasks('grunt-contrib-watch');
};
This is my .ftppass JSON file:
{ "host1": "XX.222.XXX.74", "key1": { "username": "user.name", "password": "pass" }
I've tried also with '--debug', this is what I get:
$ grunt sftp-deploy --debug Running "sftp-deploy:build" (sftp-deploy) task [D] Task source: /Users/username/Sites/project-x/node_modules/grunt-sftp-deploy/tasks/sftp-deploy.js
Logging in with username xxx Concurrency : 4
I've tried also with '--verbose', this is what I get:
$ grunt sftp-deploy --verbose Initializing Command-line options: --verbose
Reading "Gruntfile.js" Gruntfile...OK
Registering Gruntfile tasks. Reading .ftppass...OK Parsing .ftppass...OK Initializing config...OK
Registering "grunt-contrib-less" local Npm module tasks. Reading /Users/username/Sites/project-x/node_modules/grunt-contrib-less/package.json...OK Parsing /Users/username/Sites/project-x/node_modules/grunt-contrib-less/package.json...OK Loading "less.js" tasks...OK
- less
Registering "grunt-sftp-deploy" local Npm module tasks. Reading /Users/username/Sites/project-x/node_modules/grunt-sftp-deploy/package.json...OK Parsing /Users/username/Sites/project-x/node_modules/grunt-sftp-deploy/package.json...OK Loading "sftp-deploy.js" tasks...OK
- sftp-deploy
Registering "grunt-contrib-watch" local Npm module tasks. Reading /Users/username/Sites/project-x/node_modules/grunt-contrib-watch/package.json...OK Parsing /Users/username/Sites/project-x/node_modules/grunt-contrib-watch/package.json...OK Loading "watch.js" tasks...OK
- watch
Loading "Gruntfile.js" tasks...OK
No tasks were registered or unregistered.
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 -> /wwwroot/xxx-practice-installation/xxx-practice-installation/base-install/css Reading .ftppass...OK
Logging in with username xxx Concurrency : 4 Connection :: connect Connection :: close false
hi,
thanks for feedback it s interesting.
FTP SSL is not Sftp.
Please ensure you try to connect an Sftp server, not an FTPs server, otherwise you ll have to rollback to an ftp-deploy task that supports FTP over SSL.
Hey, i am having the same problem. I definitely have a SSH-/SFTP-Server.
my Gruntfile.js is:
'sftp-deploy': {
deploy: {
auth: {
host: 'server.uberspace.de',
port: 22,
authKey: 'enter'
},
cache: false,
src: '../path',
dest: 'home/path',
exclusions: [
'path/.ftppass',
'path/Gruntfile.js',
'path/package.json',
'path/node_modules',
'path/**/.DS_Store',
'path/**/.gitkeep',
],
concurrency: 4,
progress: true
}
},
.ftppass { "enter": { "username": "myusername", "password": "mypw" } }
--verbose gives me:
Running tasks: sftp-deploy
Running "sftp-deploy" task
Running "sftp-deploy:deploy" (sftp-deploy) task Verifying property sftp-deploy.deploy exists in config...OK Files: ../path -> home/path Reading .ftppass...OK
Logging in with username myusername Concurrency : 4 Connection :: connect mkdir home/path/ error or dir exists transferred=[1/31] elapsed=[0.0s] overall=[3%] eta=[0.0s] mkdir home/path/css error or dir exists transferred=[2/31] elapsed=[0.0s] overall=[6%] eta=[0.4s] mkdir home/path/img error or dir exists transferred=[3/31] elapsed=[0.1s] overall=[10%] eta=[0.5s] mkdir home/path/js error or dir exists transferred=[4/31] elapsed=[0.1s] overall=[13%] eta=[0.5s] mkdir home/path/js/vendor error or dir exists transferred=[5/31] elapsed=[0.1s] overall=[16%] eta=[0.5s] mkdir home/path/sites error or dir exists transferred=[6/31] elapsed=[0.1s] overall=[19%] eta=[0.5s] Directories done.
../path/index.html to home/path/index.html ../path/css/app.css to home/path/css/app.css ../path/css/foundation.min.css to home/path/css/foundation.min.css ../path/css/normalize.css to home/path/css/normalize.css Error uploading file: No such file
Transferred : 0 Mb Error: No such file Fatal error: Transfer did not succeeded
--debug:
Running "sftp-deploy:deploy" (sftp-deploy) task [D] Task source: /path/node_modules/grunt-sftp-deploy/tasks/sftp-deploy.js
Logging in with username myusername Concurrency : 4 transferred=[6/31] elapsed=[0.1s] overall=[19%] eta=[0.5s] [======== ]>> Directories done. Error uploading file: No such file Transferred : 0 Mb Error: No such file Fatal error: Transfer did not succeeded
I have tried cache:false and read the issues linked by @maboiteaspam . Still having no clue what the problem is. All the files are existing. Maybe someone can help me? I am new to Github and just started working with grunt. thanks!
I had the same problem as @hasenkacke .
I managed to solve the problem after looking at the issue for a similar repo: https://github.com/zonak/grunt-ftp-deploy/issues/15
It turns out it was because of a trailing slash for the src path.