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

rsync error in ssh deploy

Open saeedGanjei opened this issue 2 years ago • 16 comments

image

saeedGanjei avatar Jan 29 '23 16:01 saeedGanjei

image

saeedGanjei avatar Jan 29 '23 16:01 saeedGanjei

Iam having the same issue

NegusDev avatar Jan 31 '23 07:01 NegusDev

Same here!

vsapountzis avatar Jan 31 '23 15:01 vsapountzis

Same here

remarqUK avatar Jan 31 '23 19:01 remarqUK

same

hanassabio avatar Feb 13 '23 19:02 hanassabio

So, in my case, I noticed that my private key had a passphrase set and thus I had to also include it as a secret along with the key itself. I was able to resolve it with another workflow that allowed the user to provide an SSH key passphrase. If anyone is interested, I have used this: https://github.com/marketplace/actions/rsync-deployments-action. Hopefully, @SamKirkland can incorporate the passphrase as an optional field, if this is not a huge ask of course.

vsapountzis avatar Feb 13 '23 19:02 vsapountzis

So, in my case, I noticed that my private key had a passphrase set and thus I had to also include it as a secret along with the key itself. I was able to resolve it with another workflow that allowed the user to provide an SSH key passphrase. If anyone is interested, I have used this: https://github.com/marketplace/actions/rsync-deployments-action. Hopefully, @SamKirkland can incorporate the passphrase as an optional field, if this is not a huge ask of course.

I actually tried it without the passphrase also, and it still didn't work. Seems to be some sort of issue when web_deploy_key is generated.

hanassabio avatar Feb 13 '23 19:02 hanassabio

So, in my case, I noticed that my private key had a passphrase set and thus I had to also include it as a secret along with the key itself. I was able to resolve it with another workflow that allowed the user to provide an SSH key passphrase. If anyone is interested, I have used this: https://github.com/marketplace/actions/rsync-deployments-action. Hopefully, @SamKirkland can incorporate the passphrase as an optional field, if this is not a huge ask of course.

I actually tried it without the passphrase also, and it still didn't work. Seems to be some sort of issue when web_deploy_key is generated.

I understand. I am not sure what could be causing it but I was definitely able to resolve it by using the other workflow I mentioned and the passphrase is optional in this case.

vsapountzis avatar Feb 13 '23 19:02 vsapountzis

So, in my case, I noticed that my private key had a passphrase set and thus I had to also include it as a secret along with the key itself. I was able to resolve it with another workflow that allowed the user to provide an SSH key passphrase. If anyone is interested, I have used this: https://github.com/marketplace/actions/rsync-deployments-action. Hopefully, @SamKirkland can incorporate the passphrase as an optional field, if this is not a huge ask of course.

I actually tried it without the passphrase also, and it still didn't work. Seems to be some sort of issue when web_deploy_key is generated.

I understand. I am not sure what could be causing it but I was definitely able to resolve it by using the other workflow I mentioned and the passphrase is optional in this case.

This repo you have suggested is connecting SSH for me successfully but not actually doing any file updating. Are you able to send your git action? Are you using it alongside something else for deployment? Thank you!

hanassabio avatar Feb 14 '23 11:02 hanassabio

So, in my case, I noticed that my private key had a passphrase set and thus I had to also include it as a secret along with the key itself. I was able to resolve it with another workflow that allowed the user to provide an SSH key passphrase. If anyone is interested, I have used this: https://github.com/marketplace/actions/rsync-deployments-action. Hopefully, @SamKirkland can incorporate the passphrase as an optional field, if this is not a huge ask of course.

I actually tried it without the passphrase also, and it still didn't work. Seems to be some sort of issue when web_deploy_key is generated.

I understand. I am not sure what could be causing it but I was definitely able to resolve it by using the other workflow I mentioned and the passphrase is optional in this case.

This repo you have suggested is connecting SSH for me successfully but not actually doing any file updating. Are you able to send your git action? Are you using it alongside something else for deployment? Thank you!

I have used it as is and the only thing I changed was the port as well as the source and destination paths (be very specific with these details). In my case I just had to use the passphrase along with the private key. The username and the remote host are all details I get from my provider. My use case is local dev env --> push to repo --> rsync deploy to remote env (shared hosting with ssh access). I hope this helps.

vsapountzis avatar Feb 15 '23 07:02 vsapountzis

So, in my case, I noticed that my private key had a passphrase set and thus I had to also include it as a secret along with the key itself. I was able to resolve it with another workflow that allowed the user to provide an SSH key passphrase. If anyone is interested, I have used this: https://github.com/marketplace/actions/rsync-deployments-action. Hopefully, @SamKirkland can incorporate the passphrase as an optional field, if this is not a huge ask of course.

I actually tried it without the passphrase also, and it still didn't work. Seems to be some sort of issue when web_deploy_key is generated.

I understand. I am not sure what could be causing it but I was definitely able to resolve it by using the other workflow I mentioned and the passphrase is optional in this case.

This repo you have suggested is connecting SSH for me successfully but not actually doing any file updating. Are you able to send your git action? Are you using it alongside something else for deployment? Thank you!

I have used it as is and the only thing I changed was the port as well as the source and destination paths (be very specific with these details). In my case I just had to use the passphrase along with the private key. The username and the remote host are all details I get from my provider. My use case is local dev env --> push to repo --> rsync deploy to remote env (shared hosting with ssh access). I hope this helps.

Thanks! I have the same setup, all links up with SSH but no actual file changes :(

hanassabio avatar Feb 15 '23 11:02 hanassabio

afrter fu**** for 3 hours, found solution login on server & run

ssh-keygen -m PEM -t rsa -b 4096
cat id_rsa.pub >> authorized_keys
cat id_rsa

copy and past in secrets

it requires to start with -----BEGIN RSA PRIVATE KEY----- anything different will fail

notcod avatar Feb 21 '23 03:02 notcod

If you have been using Cpanel for over 20 years like me, may have gotten into the habit of using the server IP address instead of the hostname of the website/account, because it works without issue in FTP/SFTP on Cpanel. But that is not the case with "Web Deploy", so make sure you use the hostname. (FYI - I did not try the ftp.domainname.com, I just used the site hostname, it may work, but the site domain worked perfectly for me as the hostname)

Unfortunately, while troubleshooting I created another key as second secret to rule it out, afterwards I started getting the libcrypto error I see in the log. So I'm not sure if I left the Begin and End PEM tags out like the commenter @notcod said fixed his error, because I just switched back after getting the libcrypto error and it went away, so be sure to try his solution because that makes sense.

mikeef75 avatar Mar 16 '23 14:03 mikeef75

Same issue here. It would be lovely if this tool could either support the "default" key format (e.g. the one generated by ssh-keygen without any arguments), or ED25519. Otherwise, this should be in the docs; would help other aspiring users to debug this error when they get it too.

Pwuts avatar Apr 03 '23 14:04 Pwuts

afrter fu**** for 3 hours, found solution login on server & run

ssh-keygen -m PEM -t rsa -b 4096
cat id_rsa.pub >> authorized_keys
cat id_rsa

copy and past in secrets

it requires to start with -----BEGIN RSA PRIVATE KEY----- anything different will fail

Thank you ..spent a lot of time on this but your answer was correct ...and thanks @SamKirkland for creating/maintaining this GHA👏

greaterking avatar Jun 27 '23 03:06 greaterking

Try this: https://github.com/SamKirkland/web-deploy/issues/16#issuecomment-1813492196

michellavezzo avatar Nov 16 '23 00:11 michellavezzo