Closed emarchak closed 1 year ago
I ended up getting the deploy to work with kielabokkie/ssh-key-and-known-hosts-action@v1
and a bash script. I think the error would be contained within this action.
For anyone else, here's the script that I used that bypassed this action. I didn't really need it in the end 👇 (remember to replace <site name>
)
name: Deploy to WP Engine
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup SSH Agent
uses: kielabokkie/ssh-key-and-known-hosts-action@v1
with:
ssh-private-key: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
ssh-host: git.wpengine.com
- name: Check WP Engine connection
run: ssh git@git.wpengine.com info
- name: Deploy to WP Engine
run: |
echo "Deploying to production server on branch $GITHUB_REF"
git remote add prod git@git.wpengine.<site name>.git
git push -v -o remove-empty-dirs prod $GITHUB_REF
I'm having the same issue
I'm having the same issue. I don't understand why is authenticating with wpe_gha
debug1: Authenticating to <env name>.ssh.wpengine.net:22 as 'wpe_gha+<env name>'
+1 anyone can fix this?
@emarchak I'm wondering if it might be related to uses: actions/checkout@v3
? I believe this action relies upon uses: actions/checkout@v2
🤔
@colorful-tones It happens to me on @v2.
@gfirem @Jorgu5 are you both running Actions from a private repo? I'm just trying to get some debugging leads.
FWIW - I just did a successful deployment and I'm writing up a tutorial on using Composer, which should likely be published in the next week or two. Here is a final code though and where I've successfully run deploys: https://github.com/colorful-tones/wpe-deploy-composer
@colorful-tones yes, I'm running from a private repo. Thanks, I'll check!
@Jorgu5 @gfirem @emarchak could you contact support and reference this issue? That will enable us to get a bit more information used to troubleshoot the issue.
In the meantime I've created a ticket our our end and we're looking into it.
@daniel-savo that's what I did 2 days ago, and I thought that was the result of @colorful-tones replying here :)
@Jorgu5 Perfect, that will help significantly with troubleshooting. Thank you!
We recently published the following guided instructions in our portal that might help troubleshoot the issue, as we look into things on our end.
Thanks, @daniel-savo, however, I've done exactly the steps described in this guide and this does not solve the problem, still getting permission denied. Also, tried both on public and private repositories and the effect is the same.
For reference, my .yml is like this:
name: Deploy to WP Engine
on:
push:
branches:
- test
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: GitHub Action Deploy to WP Engine
uses: wpengine/github-action-wpe-site-deploy@v3
with:
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSH_KEY_PRIVATE }}
WPE_ENV: ${{ secrets.WPE_ENVIRONMENT_QA }}
REMOTE_PATH: "wp-content/themes/edubin-child/"
CACHE_CLEAR: TRUE
@Jorgu5 could you try again? There was a file permissions issue on your site that should have been the cause of the deployment failure, which has been fixed.
Still the same, here is the full debug trace from this action https://i.imgur.com/xcGNFeY.jpg
@Jorgu5 Interesting. Before we dig even deeper, I hate to ask you, but could you submit your site name in a chat with CX? In your previous interaction it was identified by the site URL, which can be changed and moved around.
That way we can be certain we're looking into the right one and can therefore perform some additional investigation.
@Jorgu5 One additional note: the SSH key is different from the one you've uploaded for Git push, it uses the ones uploaded in the SSH key section under your profile (or in step 2 of the aforementioned guide).
It's a limitation of the current implementation, and we realize it's confusing, which is why we're working on changing that in the future.
What is CX? I know about the SSH key, thanks for pointing that out. I'm certain I'm using the proper key.
Customer Support. With the exact site name, we can remove some of the guesswork and dig some more.
@Jorgu5 Thank you for reaching out to support, we can now see the logs associated with your connection attempts. The bad news is that we now know for a fact that the connections are being rejected because none of the SSH keys you've uploaded match the ones being presented by the GitHub Action SSH client.
So my recommendation would be to work with customer support to go over the SSH key upload process and double check things, as that is absolutely the issue here.
Closing as this has been confirmed to be a client-side configuration issue.
Describe the bug I've tried to set up the action as per the instructions, but I keep getting a failure based on my public key. I've triple checked my configuration on WP Engine and Github with ssh keys, confirmed that my env name is correct, waited a few days for the keys to propagate and confirmed there is no whitespace.
Not sure what else I could do to debug this. I expect that i'll be moving off of this plugin and using https://github.com/webfactory/ssh-agent instead.
Log is included below.
To reproduce
I followed the instructions as exactly as possible (Really!) I tried the secret at the org leve and the repo level, with no changes. The repo is private, but here's my workflows/deploy.yml config:
Expected behavior
I'd expect the public key to be accepted by wp engine.
Build Output & Screenshots
Action logs
``` Deploying refs/heads/fix/workflow toVersion information
Additional context