shipit-deploy icon indicating copy to clipboard operation
shipit-deploy copied to clipboard

deploy:update Authentication Failed

Open rphovley opened this issue 9 years ago • 3 comments

When running shipit, I get an Authentication failed error only only on a certain command.

if [ -f /home/deploy/www/notis/releases/20170629193844/REVISION ]; then cat /home/deploy/www/notis/releases/20170629193844/REVISION 2>/dev/null; fi;

If I run this command locally through ssh, it succeeds with no issues.

Since I have access to the server, can ssh and run this command successfully, and shipit runs other commands on the server successfully, it makes me think that there isn't an Authentication problem (or if there is, that shipit is getting its auth from somewhere other than the normal .ssh/ for this one command for some reason).

Running 'deploy:update' task...
Running "if [ -h /home/deploy/www/notis/current ]; then readlink /home/deploy/www/notis/current; fi" on host "104.236.135.251".
@104.236.135.251 releases/20170629193844
Previous release found.
Running "if [ -f /home/deploy/www/notis/releases/20170629193844/REVISION ]; then cat /home/deploy/www/notis/releases/20170629193844/REVISION 2>/dev/null; fi;" on host "104.236.135.251".
@104.236.135.251-err Authentication failed.
'deploy:update' errored after 59 s
Error: Command failed: ssh [email protected] "if [ -f /home/deploy/www/notis/releases/20170629193844/REVISION ]; then cat /home/deploy/www/notis/releases/20170629193844/REVISION 2>/dev/null; fi;"
Authentication failed.

    at ChildProcess.exithandler (child_process.js:211:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:885:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

rphovley avatar Jul 04 '17 00:07 rphovley

Hi, are you correctly authenticated using your ssh key? It's probably relative to your SSH configuration.

gregberge avatar Jul 04 '17 07:07 gregberge

Yeah, I can ssh into the remote machine, or run commands on the remote machine through ssh.

I haven't done any special configurations on my local aside from putting my id_rsa.pub in the remotes authorized keys for the user I'm logging in as.

I feel like this is likely something silly/small but I have not been able to identify anything unique about this particular configuration yet

rphovley avatar Jul 04 '17 14:07 rphovley

The reason in my case was that firewall on server accepted only 5 ssh login in one minute. Changing value of hit_count in UFW helped.

Linek avatar Oct 24 '17 21:10 Linek