Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR running force:auth:jwt:grant: We encountered a JSON web token error, which is likely not an issue with Salesforce CLI. Here’s the error: error:0906D06C:PEM routines:PEM_read_bio:no start line #135

Open
fehays opened this issue Apr 10, 2020 · 4 comments

Comments

@fehays
Copy link

fehays commented Apr 10, 2020

I'm able to use force:auth:jwt:grant locally and successfully log in to my org with the server.key file. However, when the build in travis-ci kicks off, i get this error:

ERROR running force:auth:jwt:grant: We encountered a JSON web token error, which is likely not an issue with Salesforce CLI. Here’s the error: error:0906D06C:PEM routines:PEM_read_bio:no start line

Not sure how to troubleshoot this one

@RatanPaul
Copy link

similar issue

ERROR running force:auth:jwt:grant: We encountered a JSON web token error, which is likely not an issue with Salesforce CLI. Here’s the error: invalid assertion

I am following this https://trailhead.salesforce.com/content/learn/projects/automate-cicd-with-gitlab/integrate-with-gitlab
and got the above error when I tried

sfdx force:auth:jwt:grant --clientid --jwtkeyfile C:\drive\GitLab\certificates/server.key --username [email protected] --setdefaultdevhubusername --setalias DevHub

@pauldchuang
Copy link

The same error happened to me.

Solution: I just realized I used the wrong set of JWT key. (Meaning the key I used in command line does not match the one in connected app.)

@ppgit007
Copy link

Thanks buddy. Actually, I missed to upload the .crt file in connected app, hence was facing the issue. Edited and updated the server.crt and it got authenticated.

@nandre-shraddha
Copy link

force:auth:jwt:grant : The term 'force:auth:jwt:grant' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1

  • force:auth:jwt:grant
  •   + CategoryInfo          : ObjectNotFound: (force:auth:jwt:grant:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

getting this error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants