SamKirkland / web-deploy

Deploy your website automatically for free
MIT License
192 stars 30 forks source link

rsync error in ssh deploy #9

Open saeedGanjei opened 1 year ago

saeedGanjei commented 1 year ago

image

saeedGanjei commented 1 year ago

image

NegusDev commented 1 year ago

Iam having the same issue

vsapountzis commented 1 year ago

Same here!

remarqUK commented 1 year ago

Same here

hanassabio commented 1 year ago

same

vsapountzis commented 1 year ago

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.

hanassabio commented 1 year ago

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.

vsapountzis commented 1 year ago

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.

hanassabio commented 1 year ago

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!

vsapountzis commented 1 year ago

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.

hanassabio commented 1 year ago

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 :(

notcod commented 1 year ago

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

mikeef75 commented 1 year ago

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.

Pwuts commented 1 year ago

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.

greaterking commented 1 year ago

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👏

michellavezzo commented 1 year ago

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

Aatmik-Sanghvi commented 6 hours ago

Can any one check the below image and help me on it. I am setting CI/CD for AWS ec2. Trying to solve the error for more than 2 days but am not getting the proper solution on the internet 😥. Thank you in advance. deploy error