Reputation: 781
I've implemented grunt-ssh plugin in order to download assets from the remote server but with no luck. There're no files listed for download.
Official grunt-ssh site has no explanation about the download method, there're few issue threads only.
My code looks like:
sftp: {
options: {
host: 'assets.xxxxx.xx',
path: '/',
port: 22,
username: 'xxxx',
privateKey: grunt.file.read('/home/xxxxxx/.ssh/id_rsa'),
passphrase: 'xxxxxx',
createDirectories: true,
directoryPermissions: parseInt(755, 8),
srcBasePath: '/home/files/assets/',
destBasePath: '/app/',
showProgress: true,
mode: 'download'
},
files: {
'images/': 'images/*'
}
}
There's no error during sftp execute, connection is established successfully. I've tried changing paths in many ways but still no files for download.
Can someone help or point out for some another grunt ssh plugin.
Upvotes: 1
Views: 257
Reputation: 781
As grunt-ssh plugin is not well maintained and it's pretty overkill for this task, I solved this with just simple shell command:
scp -r [email protected]:/home/files/assets/images/* src/images/
This is done with grunt-shell plugin.
Upvotes: 1