Skip to content

[Question] semantic release GitLab error when self signed certificates are used. #725

Open
@ievgennaida

Description

@ievgennaida

I am not able to use self-signed certificates using this plugin.

Version: "@semantic-release/gitlab": "13.1.0",

Error:
UNABLE_TO_GET_ISSUER_CERT

I have tried to set next variables:


  variables:
    GIT_SSL_NO_VERIFY: 1
    NODE_OPTION: --use-openssl-ca
    NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt
    NODE_TLS_REJECT_UNAUTHORIZED: 0
    NO_PROXY: {my.gitlab.com}

Certs are installed in the container

COPY *.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates

Error:


[3:45:01 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/gitlab"
[3:45:01 PM] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication (/api/v4)
[3:45:01 PM] [semantic-release] › ✘  Failed step "verifyConditions" of plugin "@semantic-release/gitlab"
[3:45:01 PM] [semantic-release] › ✘  An error occurred while running semantic-release: RequestError: unable to get issuer certificate
    at ClientRequest.<anonymous> (node_modules/got/dist/source/core/index.js:670:107)
    at Object.onceWrapper (node:events:633:26)
    at ClientRequest.emit (node:events:530:35)
    at TLSSocket.socketErrorListener (node:_http_client:500:9)
    at TLSSocket.emit (node:events:518: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)
    ... 2 lines matching cause stack trace ...
    at ssl.onhandshakedone (node:_tls_wrap:871:12) {
  input: undefined,
  code: '**UNABLE_TO_GET_ISSUER_CERT**',

I would appreciate any suggestion how to use self-signed certificates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions