isaacs/npm — Issue #2245: https://registry.npmjs.org breaks when pointed to the isaacs.iriscouch.net host
Author: flores
Created: 2012-03-09 00:56:02+00:00
State: open

Hi. isaacs.iriscouch.net is using a self-signed cert, which is breaking requests for https://registry.npmjs.org

Here is an example when installing coffee-script

```
npm ERR! failed to fetch https://registry.npmjs.org/coffee-script/-/coffee-script-1.2.0.tgz

npm ERR! Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR! at ClientRequest. (/usr/local/lib/node_modules/npm/node_modules/request/main.js:356:28)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1254:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! at CleartextStream.ondata (http.js:1147:24)
npm ERR! at CleartextStream._push (tls.js:367:27)
npm ERR! at SecurePair.cycle (tls.js:688:20)
npm ERR! at EncryptedStream.write (tls.js:122:13)
npm ERR! at Socket.ondata (stream.js:38:26)
npm ERR! at Socket.emit (events.js:67:17)
npm ERR! You may report this log at:
npm ERR!
npm ERR! or email it to:
npm ERR!
npm ERR!
npm ERR! System Linux 2.6.32-5-xen-686
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "coffee-script"
npm ERR! cwd /root
npm ERR! node -v v0.6.9
npm ERR! npm -v 1.1.0-3
npm ERR! message SSL Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/npm-debug.log
npm not ok
```

Verified with curl
``` curl https://registry.npmjs.org
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
```

FYI, the Amazon host in the https://registry.npmjs.org pool is fine.

Workaround for anyone else experiencing this:
```
echo '107.20.159.167 registry.npmjs.org' >> /etc/hosts
```