function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jirong HuJirong Hu 

Error authenticating with JWT config due to: certificate has expired

Our SF admin has followed this to setup long time before:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_jwt_flow.htm

Today they exported the private key to me, but I got this error running from a new Windows 2019 server:
 
>"F:\sfdx\bin\sfdx" auth:jwt:grant -u cicd.user@xxx.com.wmc.wmcsfdev -f server.key -i 3MVG97wqanbUM37KbSx.HVlzzrX363UiDRzhhwnA6lfcq6fkpU2LMZdaw1F7qi8v.iT4aM4V22rJGqAi -a wmcsfdev -r
https://xxxwmc-wmcsfdev.my.salesforce.com
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 authenticating with JWT config due to: certificate has expired
I found a cert on the org, seems not expired, not sure if its in the right place. I am a DevOps engineer, not SF admin.

User-added imageCan anyone give me an idea how to troubleshoot this?

Thanks
Jirong
SwethaSwetha (Salesforce Developers) 
HI Jirong,
Have you checked if the connected app is referencing the non-expired certificate? Thanks