kessler / license-report

create a short report about a project's dependencies (license, url etc)
MIT License
236 stars 39 forks source link

Custom Registry Cafile #41

Closed sprengerst closed 3 years ago

sprengerst commented 3 years ago

Hi,

thanks for your amazing work.

I saw that your license-report config serves the ability to override the npm registry. Is there also the ability to add a cafile? Otherwise if you are behind a proxy, the custom registry is not practicable.

http request to npm for package "sharp" failed, retrying again soon...
Error: unable to get local issuer certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1497:34)
    at TLSSocket.emit (events.js:314:20)
    at TLSSocket._finishInit (_tls_wrap.js:932:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12) {
  code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'
}

Best, Stefan

BePo65 commented 3 years ago

License-Report uses the npm package 'request' to access the registry. From the documentation of 'request' I see that there are some environment variables respected for proxies (see 'request' documentation on proxies for details).

Will this solve your issue? Sorry, but I don't have a proxied registry at hand to test it on my own.

sprengerst commented 3 years ago

Hi BePo, I will give it a try. I will comment if this is not solved the issue. Thanks for your guidance.

BePo65 commented 3 years ago

I even found an example in stackoverflow: request with proxy.