title: Error: unable to verify the first certificate in nodejs
body: <p>I'm trying to download a file from jira server using an URL but I'm getting an error.
  how to include certificate in the code to verify?</p>
  <p><strong>Error:</strong></p>
  <pre><code>Error: unable to verify the first certificate in nodejs
  
  at Error (native)
      at TLSSocket.&lt;anonymous&gt; (_tls_wrap.js:929:36)
     
    at TLSSocket.emit (events.js:104:17)
  
  at TLSSocket._finishInit (_tls_wrap.js:460:8)
  </code></pre>
  <p><strong>My Nodejs code:</strong></p>
  <pre><code>var https = require(&quot;https&quot;);
  var fs = require('fs');
  var options = {
      host: 'jira.example.com',
      path: '/secure/attachment/206906/update.xlsx'
  };
  
  https.get(options, function (http_res) {
      
      var data = &quot;&quot;;
  
    
      http_res.on(&quot;data&quot;, function (chunk) {
         
          data += chunk;
      });
  
     
      http_res.on(&quot;end&quot;, function () {
        
          var file = fs.createWriteStream(&quot;file.xlsx&quot;);
          data.pipe(file);
        
      });
  });
  </code></pre>