github-action-wpe-site-deploy: Action fails with Permission denied (publickey).

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:

name: Deploy to WP Engine
on:
  push:
    branches:
      - main
      - fix/workflow
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v3
    - name: Deploy to WP Engine
      uses: wpengine/github-action-wpe-site-deploy@v3
      with:
        WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }}
        WPE_ENV: <env name>

Expected behavior

I’d expect the public key to be accepted by wp engine.

Build Output & Screenshots

Action logs
Deploying refs/heads/fix/workflow to <env name> ...
# <env name>.ssh.wpengine.net:22 SSH-2.0-Go
prepping file perms...
file perms set...
Skipping PHP Linting.
OpenSSH_8.4p1, OpenSSL 1.1.1k  25 Mar 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to <env name>.ssh.wpengine.net [35.224.26.249] port 22.
debug1: Connection established.
debug1: identity file /github/home/.ssh/github_action type 3
debug1: identity file /github/home/.ssh/github_action-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.4
debug1: Remote protocol version 2.0, remote software version Go
debug1: no match: Go
debug1: Authenticating to <env name>.ssh.wpengine.net:22 as 'wpe_gha+<env name>'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve255[19](https://github.com/<org name>/<repo name>/actions/runs/3371051162/jobs/5643766002#step:5:20)-sha256@libssh.org
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256-etm@openssh.com compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256-etm@openssh.com compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:**********
Warning: Permanently added '<env name>.ssh.wpengine.net,35.[22](https://github.com/<org name>/<repo name>/actions/runs/3371051162/jobs/5643766002#step:5:23)4.26.[24](https://github.com/<org name>/<repo name>/actions/runs/3371051162/jobs/5643766002#step:5:25)9' (RSA) to the list of known hosts.
debug1: rekey out after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 4294967296 blocks
debug1: Will attempt key: /github/home/.ssh/github_action ED[25](https://github.com/<org name>/<repo name>/actions/runs/3371051162/jobs/5643766002#step:5:26)519 SHA256::********** explicit
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /github/home/.ssh/github_action ED25519 SHA256::********** explicit
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
wpe_gha+<repo name>@<env name>.ssh.wpengine.net: Permission denied (publickey).

Version information

  • Action version: 3
  • Git version: actions/checkout@v3
  • WordPress version: 6.0.2
  • Operating system: ubuntu-latest

Additional context

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 22 (9 by maintainers)

Most upvoted comments

@colorful-tones yes, I’m running from a private repo. Thanks, I’ll check!

@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 It happens to me on @v2.

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>'

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.