You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to connect to jenkins using:
var jenkins = require('jenkins')({ baseUrl: 'https://user:token@link', crumbIssuer: true });
But, I got:
Error: unable to verify the first certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1321:34)
at TLSSocket.emit (events.js:223:5)
at TLSSocket._finishInit (_tls_wrap.js:794:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:608:12) {
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
res: undefined
}
As you can see above. One thing for sure: jenkins server is using https. Is there a way to use token? And, does node-jenkins support https?
The text was updated successfully, but these errors were encountered:
node-jenkins uses the global https agent by default, so it will validate any certificate that the default node installation does.
You can 1) ensure that your installation has validate certificates for your node.js installation, 2) add your custom certificate using NODE_EXTRA_CA_CERTS, or 3) add a custom certificate using the https.request options or disable verification (not recommend): see #13 (comment)
I don't know how your certificates were generated or what version of node you're using, but updating to a later version of node might fix it as well.
node:internal/process/promises:225
triggerUncaughtException(err, true /* fromPromise */);
^
Error: unable to verify the first certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1498:34)
at TLSSocket.emit (node:events:376:20)
at TLSSocket._finishInit (node:_tls_wrap:933:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:707:12) {
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
}
What am I doing wrong?
(I'm not the owner of this Jenkins installation; I cannot change the certificate)
I am trying to connect to jenkins using:
var jenkins = require('jenkins')({ baseUrl: 'https://user:token@link', crumbIssuer: true });
But, I got:
Error: unable to verify the first certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1321:34)
at TLSSocket.emit (events.js:223:5)
at TLSSocket._finishInit (_tls_wrap.js:794:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:608:12) {
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
res: undefined
}
As you can see above. One thing for sure: jenkins server is using https. Is there a way to use token? And, does node-jenkins support https?
The text was updated successfully, but these errors were encountered: