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: unable to get local issuer certificate #19

Closed
mrj04 opened this issue Jan 30, 2017 · 1 comment
Closed

Error: unable to get local issuer certificate #19

mrj04 opened this issue Jan 30, 2017 · 1 comment

Comments

@mrj04
Copy link

mrj04 commented Jan 30, 2017

Hi Jan,
I am trying to run examples in serenity-js i get the below error .

$npm test

[email protected] pretest /Users/$user/Downloads/serenity-js-master/examples/todomvc-protractor-cucumber
serenity update

info: Looks like you need the latest Serenity BDD CLI jar. Let me download it for you...
events.js:160
throw er; // Unhandled 'error' event
^

Error: unable to get local issuer certificate
at Error (native)
at TLSSocket. (_tls_wrap.js:1079:38)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:185:7)
at TLSSocket._finishInit (_tls_wrap.js:603:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:433:38)
npm ERR! Test failed. See above for more details.

Thanks
RJ

@jan-molak
Copy link
Member

Hey @mrj04! If you happen to be behind a corporate proxy, your might need to configure your node.js with the local certificate your company is using (this thread provides more information).

To set the cafile:

npm config set cafile=/path/to/your/file.pem

The contents of the .pem file content would be similar to this (plain text with BEGIN/END certificate marks and the base64 content).

To generate the .pem file from a valid .crt file you can use openssl:

openssl x509 -inform der -in /path/to/the.crt -out /path/to/your/file.pem

Hope that helps!

Jan

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

2 participants