Thank you mate, rejectUnauthorized: false did the trick. !

On Thursday, 6 February 2014 21:07:55 UTC+1, Alex Kocharin wrote:
>
>  
> "npm config ..." sets npm settings, but you're using node.js. Those are 
> two entirely different applications.
>  
> In this case you can do:
> $ node -e "require('https').request({host: 'solarems.net',rejectUnauthorized: 
> false}, function(res){console.log(res.statusCode)}).end()"
> But please be careful where you're using that option. If you connect to 
> this host often, it's better to hardcode it's certificate into your source, 
> this way you will be immune to MitM attacks.
>  
> /me eagerly waits for DANE, 'cause current SSL certificates suck...
>  
>  
> 06.02.2014, 11:15, "Pratik Sathaye" <[email protected] <javascript:>>:
>
> I tried 
>  
>    npm config set ca ""
>    npm config set strict-ssl false
>  
> and both not worked for me..
>  
> I am trying to execute below command on my terminal
>  
>
> echo "require('https').request({host: 'solarems.net'}, 
> function(res){console.log(res.statusCode)}).end()" | NPM_DEBUG=https node
>
>  
>
> And I am getting
>
>  
>
> events.js:72
>         throw er; // Unhandled 'error' event
>               ^
> Error: CERT_UNTRUSTED
>     at SecurePair.<anonymous> (tls.js:1362:32)
>     at SecurePair.EventEmitter.emit (events.js:92:17)
>     at SecurePair.maybeInitFinished (tls.js:974:10)
>     at CleartextStream.read [as _read] (tls.js:462:15)
>     at CleartextStream.Readable.read (_stream_readable.js:320:10)
>     at EncryptedStream.write [as _write] (tls.js:366:25)
>     at doWrite (_stream_writable.js:221:10)
>     at writeOrBuffer (_stream_writable.js:211:5)
>     at EncryptedStream.Writable.write (_stream_writable.js:180:11)
>     at write (_stream_readable.js:583:24)
>
>  
>  
> The above command works with *node (v0.6.12).*
>  
> I have *node (v0.10.22)* and *npm (1.3.14)* installed on my system
>  
>
> How can I resolve this ?
>
>  
>
> Thanks
>
>
> On Wednesday, April 17, 2013 2:47:13 AM UTC+5:30, Trygve Lie wrote:
>
> Hi 
>
> This sounds very similar to some problems we had. We have an internal 
> copy of npm we run against and after switching from 0.8.x to 0.10.x in 
> development more or less all installs failed with CERT_UNTRUSTED errors. 
> It was actually failing a bit random. 
>
> But, resetting the ca config by setting it to null solved our problems. 
>
> Try to run: 
> ~/npm config set ca "" 
>
> That worked for us. 
>
> Trygve 
>
>
> On Tue, 2013-04-16 at 09:49 -0700, Robert Eberhart wrote: 
> > Hello, 
> > 
> > 
> > This actually isn't a problem with NodeJS per se.   The problem 
> > actually lies with my company, but I'm hoping that someone might have 
> > a way around it.  The problem is that trying to install a module with 
> > npm fails with a CERT_UNTRUSTED error.  I believe that the problem is 
> > that my company is essentially performing a Man-In-The-Middle attack 
> > on all SSL communication.  My guess is that by doing this they can 
> > block/capture communications occurring through SSL.  This makes sense 
> > in a Big Brothery kind of way.  As a result of this manipulation of 
> > the certificate path, NodeJS pitches a fit and throws the error.  My 
> > question is whether I can get NodeJS to trust the certificates that my 
> > company has inserted in the certificate path so that I can install the 
> > module as per usual.  If not, can someone please detail or point me in 
> > the direction of instructions to manually install a module.  I'm 
> > trying to install uglify.  Included below, please find the error that 
> > I am receiving. 
> > 
> > 
> > Sincerely, 
> > Robert Eberhart 
> > 
> > 
> > C:\>npm install uglify 
> > npm http GET https://registry.npmjs.org/uglify 
> > npm http GET https://registry.npmjs.org/uglify 
> > npm http GET https://registry.npmjs.org/uglify 
> > npm ERR! Error: CERT_UNTRUSTED 
> > npm ERR!     at SecurePair.<anonymous> (tls.js:1283:32) 
> > npm ERR!     at SecurePair.EventEmitter.emit (events.js:92:17) 
> > npm ERR!     at SecurePair.maybeInitFinished (tls.js:896:10) 
> > npm ERR!     at CleartextStream.read [as _read] (tls.js:430:15) 
> > npm ERR!     at CleartextStream.Readable.read 
> > (_stream_readable.js:294:10) 
> > npm ERR!     at EncryptedStream.write [as _write] (tls.js:344:25) 
> > npm ERR!     at doWrite (_stream_writable.js:211:10) 
> > npm ERR!     at writeOrBuffer (_stream_writable.js:201:5) 
> > npm ERR!     at EncryptedStream.Writable.write 
> > (_stream_writable.js:172:11) 
> > npm ERR!     at write (_stream_readable.js:547:24) 
> > npm ERR! If you need help, you may report this log at: 
> > npm ERR!     <http://github.com/isaacs/npm/issues> 
> > npm ERR! or email it to: 
> > npm ERR!     <[email protected]> 
> > 
> > 
> > npm ERR! System Windows_NT 6.1.7601 
> > npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program 
> > Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "uglify" 
> > npm ERR! cwd C:\Windows\system32 
> > npm ERR! node -v v0.10.3 
> > npm ERR! npm -v 1.2.17 
> > npm ERR! 
> > npm ERR! Additional logging details can be found in: 
> > npm ERR!     C:\Windows\system32\npm-debug.log 
> > npm ERR! not ok code 0 
> > 
> > -- 
> > -- 
> > Job Board: http://jobs.nodejs.org/ 
> > Posting guidelines: 
> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines 
> > You received this message because you are subscribed to the Google 
> > Groups "nodejs" group. 
> > To post to this group, send email to [email protected] 
> > To unsubscribe from this group, send email to 
> > [email protected] 
> > For more options, visit this group at 
> > http://groups.google.com/group/nodejs?hl=en?hl=en 
> >   
> > --- 
> > You received this message because you are subscribed to the Google 
> > Groups "nodejs" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to [email protected]. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> >   
> >   
>
>  
> -- 
> -- 
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected] <javascript:>
> To unsubscribe from this group, send email to
> [email protected] <javascript:>
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to