ssh-deploy
ssh-deploy copied to clipboard
Build keeps failing to Flywheel
[INPUTS] SSH_PRIVATE_KEY is mandatory ⚠️ [INPUTS] REMOTE_USER is mandatory ⚠️ [INPUTS] Inputs not valid, aborting ...
I have been following this doc https://getflywheel.com/wordpress-support/deploying-to-flywheel-via-ssh-and-github-actions/ to deploy to my website hosted on Flywheel. It is an organization and I know my SSH_USER is correct, team+org-name+site-name which is what I have. I am pretty sure my SSH_REMOTE_KEY is incorrect. Currently I have my id_ed25519 private key pasted in the secret. But it is saying to have it in PEM version. When I run this command in my Terminal on my Macbook Pro 2019, I get this error:
Command: openssl rsa -in ~/.ssh/id_rsa -outform pem | pbcopy Response: unable to load Private Key 4658441900:error:09FFF06C:PEM routines:CRYPTO_internal:no start line:/System/Volumes/Data/SWE/macOS/BuildRoots/2288acc43c/Library/Caches/com.apple.xbs/Sources/libressl/libressl-56.60.2/libressl-2.8/crypto/pem/pem_lib.c:684:Expecting: ANY PRIVATE KEY
I am not that great with GIT workflows, this is my first set up for a workflow so bear with me. But can anyone tell me why this is wrong?????
My private key that I pasted into my secrets within my Repo:
-----BEGIN OPENSSH PRIVATE KEY----- long key code goes here, removed for security -----END OPENSSH PRIVATE KEY-----
Everything else is working great. I am able to check in code, check out code, edit, add, delete. I really need to be able to deploy.
Usually no start line
error indicates that the PEM file is missing the indicator that the key portion has begun.
Just try openssl rsa -in ~/.ssh/id_rsa -outform pem
and see if the generated id_rsa key generated is in the following format
-----Begin <Type>-----
Key Information
-----End <Type>-----
Having the same issue here!
Macbook using RSA, Linux using ed25519
in the Live site Flywheel using RSA --> it will works and Staging site is using ed25519 --> i've still no luck with this one
@dwinurhadia I faced a similar issue. Seems like ssh-deploy supports only RSA and not ed25519. Mods and admins, Please correct me if I am wrong
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
please deploy with
runs-on: macos-latest
it will works
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.
I was able to solve for this by updating my yml file to use the latest version of easingthemes/ssh-deploy. I was on 2.1.5. Here is my new updated working yml file. This is for develop branch. I have another for my master branch as well. Hope this is helpful to someone.
name: Development Deploy on: push: branches: [ develop ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Deploy to Server uses: easingthemes/[email protected] env: SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} REMOTE_HOST: ssh.getflywheel.com REMOTE_USER: ${{ secrets.REMOTE_USER_DEVELOPMENT }} REMOTE_PORT: '22 -o PubkeyAcceptedKeyTypes=+ssh-rsa' ARGS: -rltgoDzvO --exclude .git --exclude .github TARGET: /www/wp-content/themes/
Thanks for the update.
SSH_CMD_ARGS are now available as a param (ENV var), so no need to use REMOTE_PORT hack.
https://github.com/easingthemes/ssh-deploy#11-ssh_cmd_args-optional-default--o-stricthostkeycheckingno
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.