Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insecure mode does not work #125

Open
jkonecny75 opened this issue Jan 30, 2021 · 0 comments
Open

Insecure mode does not work #125

jkonecny75 opened this issue Jan 30, 2021 · 0 comments

Comments

@jkonecny75
Copy link

We have a self-signed certificate. Due to I use --insecure parameter but DBG mode says that secure mode is still using

gtt report --insecure --verbose project/build
πŸ”  Resolving "project/build"... βœ—
Error: Invalid access token!
{ RequestError: Error: self signed certificate in certificate chain
    at new RequestError (/snapshot/gitlab-time-tracker/node_modules/request-promise-core/lib/errors.js:14:15)
    at Request.module.exports.plumbing.callback (/snapshot/gitlab-time-tracker/node_modules/request-promise-core/lib/plumbing.js:87:29)
    at Request.RP$callback [as _callback] (/snapshot/gitlab-time-tracker/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at Request.init.self.callback (/snapshot/gitlab-time-tracker/node_modules/request/request.js:185:22)
    at Request.emit (events.js:182:13)
    at Request.onRequestError (/snapshot/gitlab-time-tracker/node_modules/request/request.js:877:8)
    at ClientRequest.emit (events.js:182:13)
    at TLSSocket.socketErrorListener (_http_client.js:382:9)
    at TLSSocket.emit (events.js:182:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
  name: 'RequestError',
  message: 'Error: self signed certificate in certificate chain',
  cause:
   { Error: self signed certificate in certificate chain
       at TLSSocket.onConnectSecure (_tls_wrap.js:1055:34)
       at TLSSocket.emit (events.js:182:13)
       at TLSSocket._finishInit (_tls_wrap.js:635:8) code: 'SELF_SIGNED_CERT_IN_CHAIN' },
  error:
   { Error: self signed certificate in certificate chain
       at TLSSocket.onConnectSecure (_tls_wrap.js:1055:34)
       at TLSSocket.emit (events.js:182:13)
       at TLSSocket._finishInit (_tls_wrap.js:635:8) code: 'SELF_SIGNED_CERT_IN_CHAIN' },
  options:
   { json: true,
     insecure: false,
     resolveWithFullResponse: true,
     headers: { 'PRIVATE-TOKEN': 'my-token' },
     uri:
      'https://gitlab.ourcomapany.org:443/api/v4/broadcast_messages?private_token=my-token&page=1&per_page=100',
     callback: [Function: RP$callback],
     transform: undefined,
     simple: true,
     transform2xxOnly: false },
  response: undefined }

The workarround is to export evn NODE_TLS_REJECT_UNAUTHORIZED='0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant