sindresorhus/npm-name

Does not support private registries.

Closed this issue · 1 comments

The module doesn't support the full gamut of possible npm configurations, including registries with always-auth on and self-signed certificates.

Specifically, using generator-generator in an environment using a private secured registry will fail with the following error:

RequestError: self signed certificate in certificate chain
    at ClientRequest.req.once.err (/Users/wmfeht/.npm/lib/node_modules/generator-generator/node_modules/npm-name/node_modules/got/index.js:66:21)
    at ClientRequest.g (events.js:286:16)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at TLSSocket.socketErrorListener (_http_client.js:306:9)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:188:7)
    at emitErrorNT (net.js:1272:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Looking at the code, even if you get past the self-signed cert issue, there aren't any provisions to provide an auth token along with the request if always-auth is configured.

This module uses https://github.com/sindresorhus/package-json to handle the communication with the registry. See: sindresorhus/package-json#18