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

Unable to deploy

Open chris-ball opened this issue 3 years ago • 3 comments

I'm able to successfully connect using PuTTY from my local machine, but using the same credentials I cannot deploy, for some reason. Logs are as follows:

⚠️ [Rsync] error: rsync exited with code 255 ⚠️ [Rsync] stderr: Warning: Permanently added '[***]:18765,[35.214.39.221]:18765' (ED25519) to the list of known hosts. @: Permission denied (publickey). rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]

⚠️ [Rsync] stdout:
⚠️ [Rsync] cmd: rsync /home/runner/work/hopemill/hopemill/ @:www/chrisb222.sg-host.com/public_html/ --rsh "ssh -p 18765 -i /home/runner/.ssh/deploy_key -o StrictHostKeyChecking=no" --recursive --exclude= -rltgoDzvO 1: 0x9da7c0 node::Abort() [/home/runner/runners/2.283.2/externals/node12/bin/node] 2: 0xa4e219 [/home/runner/runners/2.283.2/externals/node12/bin/node] 3: 0xba5d59 [/home/runner/runners/2.283.2/externals/node12/bin/node] 4: 0xba7b47 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [/home/runner/runners/2.283.2/externals/node12/bin/node] 5: 0x13750d9 [/home/runner/runners/2.283.2/externals/node12/bin/node]

chris-ball avatar Oct 08 '21 18:10 chris-ball

I encountered the same error. My guess is rsync used by ssh-deploy supports RSA key pair and not ED25519 key pair. I tried creating a new RSA key and it worked. Try again by generating a RSA key. (Refer https://github.com/easingthemes/ssh-deploy#1-ssh_private_key-required)

limatgans avatar Oct 13 '21 06:10 limatgans

same error,append the pub key into authorized_keys

cat id_rsa.pub >> authorized_keys

then it‘s work

munding avatar Nov 04 '21 08:11 munding

When I added the private key content as GitHub's secret, I removed a blank line at the end of it below -----END OPENSSH PRIVATE KEY----- line. This caused me to receive the same error. I recopied the private key content and left the blank line intact and it works. I am not sure why this blank line was necessary but I am pretty sure that was it. There is still a small chance that I accidentally modified other content of the file during copy/paste. So my suggestion is that when you face this error first make sure that you have correctly set your Github's secret variables.

information-security avatar Jan 09 '22 01:01 information-security

I'm able to successfully connect using PuTTY from my local machine, but using the same credentials I cannot deploy, for some reason. Logs are as follows:

⚠️ [Rsync] error: rsync exited with code 255 ⚠️ [Rsync] stderr: Warning: Permanently added '[]:18765,[35.214.39.221]:18765' (ED25519) to the list of known hosts. _@*_: Permission denied (publickey). rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]

⚠️ [Rsync] stdout: ⚠️ [Rsync] cmd: rsync /home/runner/work/hopemill/hopemill/ @:www/chrisb222.sg-host.com/public_html/ --rsh "ssh -p 18765 -i /home/runner/.ssh/deploy_key -o StrictHostKeyChecking=no" --recursive --exclude= -rltgoDzvO 1: 0x9da7c0 node::Abort() [/home/runner/runners/2.283.2/externals/node12/bin/node] 2: 0xa4e219 [/home/runner/runners/2.283.2/externals/node12/bin/node] 3: 0xba5d59 [/home/runner/runners/2.283.2/externals/node12/bin/node] 4: 0xba7b47 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [/home/runner/runners/2.283.2/externals/node12/bin/node] 5: 0x13750d9 [/home/runner/runners/2.283.2/externals/node12/bin/node]

have you solve the problem,

zhanfenghai avatar Dec 11 '22 06:12 zhanfenghai

I encountered the same error. My guess is rsync used by ssh-deploy supports RSA key pair and not ED25519 key pair. I tried creating a new RSA key and it worked. Try again by generating a RSA key. (Refer https://github.com/easingthemes/ssh-deploy#1-ssh_private_key-required)

I have do it follow ablve,but it does not work

zhanfenghai avatar Dec 11 '22 07:12 zhanfenghai

In latest updates script execution via ssh is added.

If you have ssh connection issue, try adding SCRIPT_BEFORE: ls. This will trigger known_hosts update which should help with specific connection issues.

Also it is certain way to check if issue is in connection or in rsync command.

  1. SCRIPT_BEFORE (optional, default '') Script to run on host machine before rsync. Single line or multiline commands. Execution is preformed by storing commands in .sh file and executing it via .bash over ssh

  2. SCRIPT_AFTER (optional, default '') Script to run on host machine after rsync. Rsync output is stored in $RSYNC_STDOUT env variable.

Screenshot 2023-01-03 at 04 12 32

easingthemes avatar Jan 03 '23 03:01 easingthemes

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Feb 03 '23 02:02 github-actions[bot]

Lost more than 3 hours and not yet connected in ssh via github-actions. What's wrong with this ***** key. I test like all solution :

  • add it to authorized_keys
  • add private & public keys in github (test all because it's very explicit where we should put the keys...)
  • restart all 5 times

And .. Nothing. I dont understand what im doing wrong. = |

BECKQuentin avatar Apr 29 '23 00:04 BECKQuentin