3

I'm trying to create a Github action to authorise a Github action and then create a scratch org to run tests against, but I keep getting the below error when trying to authorise. How can I debug this?

I created the certificate following the steps here using openssl

- name: Authenticate Against Dev Hub
  run: sfdx force:auth:jwt:grant --clientid ${{ secrets.SF_APP_KEY_PROD }} --jwtkeyfile keys/server.key --username ${{ secrets.SF_USERNAME_PROD }} --instanceurl ${{ secrets.SF_INSTANCE_URL_PROD }} --setdefaultdevhubusername -a DevHub

ERROR running auth:jwt:grant: We encountered a JSON web token error, which is likely not an issue with Salesforce CLI. Here’s the error: error:1E08010C:DECODER routines::unsupported

5
  • Did you happen to set a password on the server.key Dec 22, 2021 at 21:32
  • Challenge Password? Yes I've tried with and without setting this when creating the cert. No difference Dec 22, 2021 at 21:35
  • And you have uploaded the public cert successfully to your Connected App? Dec 22, 2021 at 21:39
  • 2
    Yep. Figured it out, was missing -----BEGIN RSA PRIVATE KEY----- & -----END RSA PRIVATE KEY----- in my server.key Dec 22, 2021 at 22:12
  • 1
    Be sure to add this as an answer to benefit the Community
    – cropredy
    Dec 23, 2021 at 0:55

1 Answer 1

2

Figured it out, was missing -----BEGIN RSA PRIVATE KEY----- & -----END RSA PRIVATE KEY----- in my server.key as I'd copied it into an environment variable.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .