dasuchin / grunt-ssh-deploy

Grunt SSH Deployment
MIT License
66 stars 45 forks source link

SCP Upload not working when authenticating using a privateKey #14

Closed BernhardBehrendt closed 9 years ago

BernhardBehrendt commented 9 years ago

Tried to figure out the reason for that problem and found -i Parameter and path to key file is missing. In ssh-deploy configuration is only an option to import appropriate key files content.

In ssh_deploy.js task file on line 112:

var command = 'scp -P ' + options.port + ' -r ' + options.local_path + '/ ' + remote_string;

Adding a new option (privateKeyPath) solves the issue for me with a fix on scp command var command = 'scp -i ' + options.privateKeyPath + ' -P ' + options.port + ' -r ' + options.local_path + '/ ' + remote_string;

dasuchin commented 9 years ago

Is anyone else having an issue like this? If so then we can have someone make a fix and issue a pull request to solve it.

hurricane766 commented 9 years ago

This is the old version of ssh_deploy that used the command line. The newer version uses node-scp2 to handle this.