Getting error "SELF_SIGNED_CERT_IN_CHAIN" while running the process.
We are trying to use the same image & code base, but we end up with the error below. Any assistance would be really helpful. Please note, we already tried with multiple options.
- Added the certs file
- npm config set cafile "/etc/ssl/cert.pem" -g
- npm config set ca=""
- export NODE_TLS_REJECT_UNAUTHORIZED=0 (last options )
(node:77) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
[3:03:56 AM] [semantic-release] › ✘ Failed step "verifyConditions" of plugin "@semantic-release/gitlab"
[3:03:56 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/changelog"
[3:03:56 AM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[3:03:56 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/exec"
[3:03:56 AM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/exec"
[3:03:56 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/git"
[3:03:56 AM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/git"
[3:03:56 AM] [semantic-release] › ✘ An error occurred while running semantic-release: RequestError: self-signed certificate in certificate chain
at ClientRequest.<anonymous> (file:///usr/local/lib/node_modules/@semantic-release/gitlab/node_modules/got/dist/source/core/index.js:669:107)
at Object.onceWrapper (node:events:634:26)
at ClientRequest.emit (node:events:531:35)
at TLSSocket.socketErrorListener (node:_http_client:492:9)
at TLSSocket.emit (node:events:519:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
at TLSSocket.onConnectSecure (node:_tls_wrap:1674:34)
at TLSSocket.emit (node:events:519:28)
at TLSSocket._finishInit (node:_tls_wrap:1085:8)
at ssl.onhandshakedone (node:_tls_wrap:871:12) {
input: undefined,
code: 'SELF_SIGNED_CERT_IN_CHAIN',
timings: {
start: 1705979036485,
socket: 1705979036487,
lookup: 1705979036489,
connect: 1705979036490,
secureConnect: undefined,
upload: undefined,
response: undefined,
end: undefined,
error: 1705979036498,
abort: undefined,
phases: {
wait: 2,
dns: 2,
tcp: 1,
tls: undefined,
request: undefined,
firstByte: undefined,
download: undefined,
total: 13
}
},
options: {
request: undefined,
agent: { http: undefined, https: undefined, http2: undefined },
h2session: undefined,
decompress: true,
timeout: {
connect: undefined,
lookup: undefined,
read: undefined,
request: undefined,
response: undefined,
secureConnect: undefined,
send: undefined,
socket: undefined
},
prefixUrl: '',
body: undefined,
form: undefined,
json: undefined,
cookieJar: undefined,
ignoreInvalidCookies: false,
searchParams: undefined,
dnsLookup: undefined,
dnsCache: undefined,
context: {},
hooks: {
init: [],
beforeRequest: [],
beforeError: [],
beforeRedirect: [],
beforeRetry: [],
afterResponse: []
},
followRedirect: true,
maxRedirects: 10,
cache: undefined,
throwHttpErrors: true,
username: '',
password: '',
http2: false,
allowGetBody: false,
headers: {
'user-agent': 'got (https://github.com/sindresorhus/got)',
'private-token': '[secure]',
accept: 'application/json',
'accept-encoding': 'gzip, deflate, br'
},
methodRewriting: false,
dnsLookupIpVersion: undefined,
parseJson: [Function: parse],
stringifyJson: [Function: stringify],
retry: {
limit: 2,
methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ],
statusCodes: [
408, 413, 429, 500,
502, 503, 504, 521,
522, 524
],
errorCodes: [
'ETIMEDOUT',
'ECONNRESET',
'EADDRINUSE',
'ECONNREFUSED',
'EPIPE',
'ENOTFOUND',
'ENETUNREACH',
'EAI_AGAIN'
],
maxRetryAfter: undefined,
calculateDelay: [Function: calculateDelay],
backoffLimit: Infinity,
noise: 100
},
localAddress: undefined,
method: 'GET',
createConnection: undefined,
cacheOptions: {
shared: undefined,
cacheHeuristic: undefined,
immutableMinTimeToLive: undefined,
ignoreCargoCult: undefined
},
Edited by Senthil Kumar