0

I'm getting the following error when attempting to authorize a Hub environment to use Salesforce DX. I've set the variables including the path to the server.key. Also, I'm attempting to authorize from a Linux server.Is this a syntactical error or am I missing something here?

export JWT_KEY_FILE=/certificates

sfdx force:auth:jwt:grant --clientid ${CONSUMER_KEY} --username ${HUB_USERNAME} \ --jwtkeyfile ${JWT_KEY_FILE} --setdefaultdevhubusername

Unexpected argument --jwtkeyfile

2
  • 4
    Remove the backslash \ that's an escape character to handle a linebreak.
    – Mark Pond
    Apr 3, 2018 at 21:10
  • I removed the backslash and now get another error: Missing required flag --username
    – VanAlfredo
    Apr 3, 2018 at 23:59

1 Answer 1

1

Make sure your absolute path to your JWT_KEY_FILE includes both the path and file name with extension - i.e. export JWT_KEY_FILE=/users/yourname/certificates/server.key

1
  • It needed to execute on one line and also the server.key needed to be specified in the path. Thank you both for your responses! It’s working now.
    – VanAlfredo
    Apr 7, 2018 at 11:01

You must log in to answer this question.

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