Closed lietzi closed 9 years ago
What operating system?
See here
I had a similar issue and just commented out the line because I'm only ever using agent not password or privatekey.
You could also just set privatekey to point to your local private key file.
Also notice that 'agent' isn't actually used in the code anywhere and could be left out entirely. I believe the default would be for the process to use the environment's private key(s).
i'm currently working on manjaro-linux.. but sometimes at win7.. so it would be nice to use something 'system-neutral' in the gruntfile..
moreover i don't like to save my credentials unencrypted elsewhere.. especially the pass-phrase of my ssh-private-key..
the agent is mentioned in this options-listing - it should be possible to use it!
@hurricane766 When i commented out the mentioned line it did not work either.
Fatal error: Argument must be a string
@lietzi try also commenting out lines 19 - 22. or if (options.agent) { //default key will be used } else if (options.privateKey) { scpOptions.privateKey = options.privateKey } else { scpOptions.password = options.password; }
@hurricane766 thx. now i can connect to server via agent - and the releases folders are created - but the upload stuck with this:
Fatal error: Timed out while waiting for handshake
scp from terminal works normal.. & readyTimeout: 99999 is set..
:(
@lietzi sorry, not too sure what's going on. If it created the releases folder then it did connect, but sounds like it's timing out waiting for the client.scp() . You could try modifing the scpBuild function to operate like other commands and just use a command string instead of the client.scp call - since you're saying that the scp works from the terminal.
Following on from what @hurricane766 said, you could try replacing scpBuild with the following tarBuild function I've been using. This has been my preferred method of deployment, I've found transfer speeds to be much faster.
var tarBuild = function(callback) {
var remote_string = 'ssh ' + options.username + '@' + options.host + ' -p' + options.port + ' "tar -C ' + options.deploy_path + '/releases/' + timestamp + '/' + ' -jxf -"'
var command = 'tar -C ' + options.local_path + ' -jcf - ./ | ' + remote_string;
grunt.log.subhead('UPLOADING NEW BUILD');
grunt.log.writeln('>> ' + command);
execLocal(command, callback);
};
Deploying with agent should be working in the current version. Close?
Hi,
i just tried to deploy with thesse settings - but it did not work:
The only errormessage was:
I thought, the input of password or key was not necessary with agent?
using ssh host.de in terminal works as expected..
thx for your help!
greetings