Skip to content

Commit

Permalink
Add doc for --acceptCertificate (#322)
Browse files Browse the repository at this point in the history
* Add doc for --acceptCertificate
  • Loading branch information
sc-illiakovalenko authored Mar 17, 2020
1 parent cc6e302 commit 56595f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Binary file added docs/assets/img/certificate-error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion docs/data/routes/docs/getting-started/app-deployment/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,14 @@ Now we are all ready to deploy our JSS app to the Sitecore instance.

If your Sitecore instance is local, or accessible via file share, you can use the CLI for an automated deployment. Skip to 3.2 for a remote instance.

1. Open a command prompt/terminal within your JSS app
If you are using local self-signed certificate:
1. Open a command prompt/terminal within your JSS app. If you know certificate value skip to step 4.
1. Run command using wrong certificate thumbprint `jss deploy app --includeContent --includeDictionary --acceptCertificate test`
1. From error message copy certificate thumbprint and paste instead of `test`
<img src="/assets/img/certificate-error.png" alt="Certificate error" class="img-fluid img-thumbnail" />
1. `jss deploy app --includeContent --includeDictionary --acceptCertificate CA:CD:3B:DB:19:D1:97:92:F9:80:91:FF:32:CC:F8:35:DC:F5:0B:01`

If you are not using local self-signed certificate:
1. `jss deploy app --includeContent --includeDictionary`

This will:
Expand All @@ -154,6 +161,8 @@ This will:
- Install the package over HTTP(S) on your Sitecore instance.
- Copy build artifacts to the Sitecore website folder

> `--acceptCertificate` parameter whitelists an SSL certificate by thumbprint (certificate pinning). Because Node does not respect Windows trusted root certificates, this enables deploying items to local Sitecore instances that use self-signed certificates without disabling SSL validation entirely.
> There are many available options for `jss deploy app`, which are all set to sensible defaults if unspecified. You can see all of the options for it using `jss deploy app --help`.
Note that content, media, and dictionary items are not installed by the deployment process by default (which is why we used `--includeContent --includeDictionary`). It's appropriate to include them as long as disconnected content is being updated but inappropriate if content editors are at work writing content for the app, as they could lose content data. See [content workflows](/docs/fundamentals/dev-workflows/code-first#content-workflow-and-developer-overwrite) for a way to have both coexist.
Expand Down

0 comments on commit 56595f8

Please sign in to comment.