I'd like to collect information from privately installed Jira server but I've got a problem doing it.
Of course, I can connect the the site using my Chrome browser and it also find calling REST API from the browser address bar - https://myjiraaddr/rest/api/2/search
Sending REST API request using curl works okay with -u option(username:password) from command line.
But if I try it using nodejs and got an error says self signed certificate in certificate chain.
Can anybody please explain what makes these differences and how to fix it?
Thanks in advance :)
JiraApi = require('jira').JiraApi;
var jira = new JiraApi('https', 'myjiraaddress', 443, 'username', 'password', '2.0.alpha1');
jira.getCurrentUser(function(error, issue) {
console.log(error);
});
it prints...
Status: Error: self signed certificate in certificate chain
And error if I use jira-client npm package...
RequestError: Error: self signed certificate in certificate chain
at new RequestError (/Users/hyoon/dev/node/work-tracker/node_modules/request-promise-core/lib/errors.js:14:15)
at Request.plumbing.callback (/Users/hyoon/dev/node/work-tracker/node_modules/request-promise-core/lib/plumbing.js:87:29)
at Request.RP$callback [as _callback] (/Users/hyoon/dev/node/work-tracker/node_modules/request-promise-core/lib/plumbing.js:46:31)
at self.callback (/Users/hyoon/dev/node/work-tracker/node_modules/request/request.js:185:22)
at Request.emit (events.js:310:20)
at Request.onRequestError (/Users/hyoon/dev/node/work-tracker/node_modules/request/request.js:877:8)
at ClientRequest.emit (events.js:310:20)
at TLSSocket.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:310:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
cause: Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (_tls_wrap.js:1474:34)
at TLSSocket.emit (events.js:310:20)
at TLSSocket._finishInit (_tls_wrap.js:917:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:687:12) {
code: 'SELF_SIGNED_CERT_IN_CHAIN'
},
error: Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (_tls_wrap.js:1474:34)
at TLSSocket.emit (events.js:310:20)
at TLSSocket._finishInit (_tls_wrap.js:917:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:687:12) {
code: 'SELF_SIGNED_CERT_IN_CHAIN'
},