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

RequestError: unable to verify the first certificate #376

Closed
frankbloggs opened this issue May 13, 2022 · 2 comments
Closed

RequestError: unable to verify the first certificate #376

frankbloggs opened this issue May 13, 2022 · 2 comments
Labels

Comments

@frankbloggs
Copy link

Trying to implement in CI pipeline, GL_TOKEN in place, ssl certificate-bundle finally setup correctly and working
git ls-remote --heads https://.... working correctly

I feel I'm very close now and really don't want to give-up now, any help to resolve this greatly appreciated,.

RUN npm install -g
[email protected]
@semantic-release/[email protected]
@semantic-release/[email protected]

.releaserc.json
{
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/gitlab", {
"gitlabUrl": "https://git.technologies.com",
"gitlabApiPathPrefix": "/api/v4"
}
],
[
"@semantic-release/exec", {
"verifyReleaseCmd": "echo "VERSION=${nextRelease.version}" >> vars.env"
}
]
]
}

Log:
npx semantic-release --dry-run
[1:29:50 AM] [semantic-release] › ℹ Running semantic-release version 19.0.2
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/gitlab"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/exec"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/exec"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "verifyRelease" from "@semantic-release/exec"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/exec"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/exec"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/gitlab"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/exec"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/exec"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "success" from "@semantic-release/gitlab"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "success" from "@semantic-release/exec"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "fail" from "@semantic-release/gitlab"
[1:29:50 AM] [semantic-release] › ✔ Loaded plugin "fail" from "@semantic-release/exec"
[1:29:51 AM] [semantic-release] › ⚠ Run automated release from branch master on repository https://gitlab-ci-token:[secure]@git.technologies.com/submodule-test/tp2.git in dry-run mode
[1:29:51 AM] [semantic-release] › ✔ Allowed to push to the Git repository
[1:29:51 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/gitlab"
[1:29:51 AM] [semantic-release] [@semantic-release/gitlab] › ℹ Verify GitLab authentication (https://git.technologies.com/api/v4)
[1:29:51 AM] [semantic-release] › ✖ Failed step "verifyConditions" of plugin "@semantic-release/gitlab"
[1:29:51 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/exec"
[1:29:51 AM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/exec"
[1:29:51 AM] [semantic-release] › ✖ An error occurred while running semantic-release: RequestError: unable to verify the first certificate
at ClientRequest. (/usr/local/lib/node_modules/@semantic-release/gitlab/node_modules/got/dist/source/core/index.js:962:111)
at Object.onceWrapper (node:events:510:26)
at ClientRequest.emit (node:events:402:35)
at ClientRequest.origin.emit (/usr/local/lib/node_modules/@semantic-release/gitlab/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
at TLSSocket.socketErrorListener (node:_http_client:447:9)
at TLSSocket.emit (node:events:390:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
at TLSSocket.emit (node:events:390:28)
at TLSSocket._finishInit (node:_tls_wrap:944:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12) {
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
.......
AggregateError:
RequestError: unable to verify the first certificate
at ClientRequest. (/usr/local/lib/node_modules/@semantic-release/gitlab/node_modules/got/dist/source/core/index.js:962:111)
at Object.onceWrapper (node:events:510:26)
at ClientRequest.emit (node:events:402:35)
at ClientRequest.origin.emit (/usr/local/lib/node_modules/@semantic-release/gitlab/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
at TLSSocket.socketErrorListener (node:_http_client:447:9)
at TLSSocket.emit (node:events:390:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
at TLSSocket.emit (node:events:390:28)
at TLSSocket._finishInit (node:_tls_wrap:944:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)
at /usr/local/lib/node_modules/semantic-release/lib/plugins/pipeline.js:54:11
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.pluginsConf. [as verifyConditions] (/usr/local/lib/node_modules/semantic-release/lib/plugins/index.js:80:11)
at async run (/usr/local/lib/node_modules/semantic-release/index.js:103:3)
at async module.exports (/usr/local/lib/node_modules/semantic-release/index.js:268:22)
at async module.exports (/usr/local/lib/node_modules/semantic-release/cli.js:55:5)
Cleaning up project directory and file based variables

@fgreinacher
Copy link
Contributor

Looks like a problem with the TLS certificate of your GitLab instance to me.

Maybe self-signed?

@fgreinacher
Copy link
Contributor

Closing for lack of feedback.

Probably same issue as in #489.

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

No branches or pull requests

2 participants