1

I have version 9.0 update 2 and am working with the sample JSS app. I used the this same app on an earlier environment which was setup as Standalone and had no issues. This is a remote deploy to a scaled environment. When I attempt the command -jss deploy items - I get the following error.

Unexpected response from import service: Error: unable to get local issuer certificate

This is the scjssconfig.json file I am currently using.

{
  "sitecore": {
    "instancePath": "C:\\sc9_install\\my-sitecore-jss",
    "apiKey": "{00000000-0000-0000-0000-000000000000}",
    "deploySecret": "",
    "deployUrl": "https://sitecore-scaled/sitecore/api/jss/import",
    "layoutServiceHost": "my-sitecore-jss"
  }
}
2

It sounds like the SSL certificate on your remote instance is not trusted. Node does not use Windows' cert store, so if it's a trusted cert there it will not be trusted in the JSS CLI.

You can use the --acceptCertificate [cert thumbprint] parameter to make the CLI trust a specific SSL certificate during deployment. To make this easier, consider placing it as an npm script in your package.json (thus running it something like npm run deploy-items-to-scaled or whatever you named the script)

  • Just in case if @Kam's solution with --acceptCertificate doesn't work, consider switching deployUrl to http from https (may require some Sitecore configuration). "Works on my machine" :) – Alex Shyba Feb 19 at 22:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.