gitlab
gitlab copied to clipboard
git ls-remote --heads https://gitlab-ci-token:... request fails
I've followed the tutorial for Gitlab over at https://docs.gitlab.com/ee/ci/examples/semantic-release.html. When running our pipeline, we're receiving an authentication error. I've defined a GITLAB_TOKEN variable with the value set to my Project Access Token value. I've defined a NPM_TOKEN variable with the value set to my Personal Access Token value. I've defined a GITLAB_URL variable with the value set to 'https://gitlab.atsgroep.be/'. I've defined a GITLAB_PREFIX variable with the value set to '/api/v4'.
Gitlab version: 13.3.6-ee (d7bc82f4b06) Gitlab shell version: 13.6.0
semantic-release --debug [7:36:14 AM] [semantic-release] › ℹ Running semantic-release version 17.3.0 2020-12-11T07:36:14.878Z semantic-release:config load config from: /builds/DEV/vanguard/.releaserc.json 2020-12-11T07:36:14.893Z semantic-release:config options values: { branches: [ 'master' ], repositoryUrl: 'https://gitlab-ci-token:[secure]@gitlab.atsgroep.be/DEV/vanguard.git', tagFormat: 'v${version}', plugins: [ '@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/gitlab', '@semantic-release/npm', [ '@semantic-release/git', [Object] ] ], _: [], debug: true, '$0': 'node_modules/.bin/semantic-release' } 2020-12-11T07:36:15.386Z semantic-release:plugins options for @semantic-release/gitlab/verifyConditions: {} [7:36:15 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/gitlab" 2020-12-11T07:36:15.392Z semantic-release:plugins options for @semantic-release/npm/verifyConditions: {} [7:36:15 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm" 2020-12-11T07:36:15.393Z semantic-release:plugins options for @semantic-release/git/verifyConditions: { assets: [ 'package.json' ], message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}' } [7:36:15 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/git" 2020-12-11T07:36:15.394Z semantic-release:plugins options for @semantic-release/commit-analyzer/analyzeCommits: {} [7:36:15 AM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer" 2020-12-11T07:36:15.395Z semantic-release:plugins options for @semantic-release/release-notes-generator/generateNotes: {} [7:36:15 AM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator" 2020-12-11T07:36:15.396Z semantic-release:plugins options for @semantic-release/npm/prepare: {} [7:36:15 AM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/npm" 2020-12-11T07:36:15.397Z semantic-release:plugins options for @semantic-release/git/prepare: { assets: [ 'package.json' ], message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}' } [7:36:15 AM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/git" 2020-12-11T07:36:15.398Z semantic-release:plugins options for @semantic-release/gitlab/publish: {} [7:36:15 AM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/gitlab" 2020-12-11T07:36:15.399Z semantic-release:plugins options for @semantic-release/npm/publish: {} [7:36:15 AM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/npm" 2020-12-11T07:36:15.399Z semantic-release:plugins options for @semantic-release/npm/addChannel: {} [7:36:15 AM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/npm" 2020-12-11T07:36:15.426Z semantic-release:get-git-auth-url Verifying ssh auth by attempting to push to https://gitlab-ci-token:[secure]@gitlab.atsgroep.be/DEV/vanguard.git 2020-12-11T07:36:15.655Z semantic-release:git Error: Command failed with exit code 128: git push --dry-run --no-verify https://gitlab-ci-token:[secure]@gitlab.atsgroep.be/DEV/vanguard.git HEAD:master remote: You are not allowed to upload code. fatal: unable to access 'https://gitlab.atsgroep.be/DEV/vanguard.git/': The requested URL returned error: 403 at makeError (/builds/DEV/vanguard/node_modules/semantic-release/node_modules/execa/lib/error.js:59:11) at handlePromise (/builds/DEV/vanguard/node_modules/semantic-release/node_modules/execa/index.js:114:26) at process._tickCallback (internal/process/next_tick.js:68:7) 2020-12-11T07:36:15.655Z semantic-release:get-git-auth-url SSH key auth failed, falling back to https. [7:36:15 AM] [semantic-release] › ✖ An error occurred while running semantic-release: { Error: Command failed with exit code 128: git ls-remote --heads https://gitlab-ci-token:[secure]@gitlab.atsgroep.be/DEV/vanguard.git remote: HTTP Basic: Access denied fatal: Authentication failed for 'https://gitlab.atsgroep.be/DEV/vanguard.git/' at makeError (/builds/DEV/vanguard/node_modules/semantic-release/node_modules/execa/lib/error.js:59:11) at handlePromise (/builds/DEV/vanguard/node_modules/semantic-release/node_modules/execa/index.js:114:26) at process._tickCallback (internal/process/next_tick.js:68:7) shortMessage: 'Command failed with exit code 128: git ls-remote --heads https://gitlab-ci-token:[secure]@gitlab.atsgroep.be/DEV/vanguard.git', command: 'git ls-remote --heads https://gitlab-ci-token:[secure]@gitlab.atsgroep.be/DEV/vanguard.git', exitCode: 128, signal: undefined, signalDescription: undefined, stdout: '', stderr: 'remote: HTTP Basic: Access denied\nfatal: Authentication failed for 'https://gitlab.atsgroep.be/DEV/vanguard.git/'', failed: true, timedOut: [secure], isCanceled: [secure], killed: [secure] } { Error: Command failed with exit code 128: git ls-remote --heads https://gitlab-ci-token:[secure]@gitlab.atsgroep.be/DEV/vanguard.git remote: HTTP Basic: Access denied fatal: Authentication failed for 'https://gitlab.atsgroep.be/DEV/vanguard.git/' at makeError (/builds/DEV/vanguard/node_modules/semantic-release/node_modules/execa/lib/error.js:59:11) at handlePromise (/builds/DEV/vanguard/node_modules/semantic-release/node_modules/execa/index.js:114:26) at process._tickCallback (internal/process/next_tick.js:68:7) shortMessage: 'Command failed with exit code 128: git ls-remote --heads https://gitlab-ci-token:[secure]@gitlab.atsgroep.be/DEV/vanguard.git', command: 'git ls-remote --heads https://gitlab-ci-token:[secure]@gitlab.atsgroep.be/DEV/vanguard.git', exitCode: 128, signal: undefined, signalDescription: undefined, stdout: '', stderr: 'remote: HTTP Basic: Access denied\nfatal: Authentication failed for 'https://gitlab.atsgroep.be/DEV/vanguard.git/'', failed: true, timedOut: [secure], isCanceled: [secure], killed: [secure] }npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @DEV/[email protected] semantic-release:
semantic-release --debug
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @DEV/[email protected] semantic-release script.
@aldrashan Thanks for error log!
What you have should be working, so I'm not 100% sure what the correct fix is 🤔 But here's a few things to try:
- Give your Project Access Token both the
api
andwrite_repository
scope - If ☝️ doesn't work, swap out the Project Access Token for a Personal Access Token
Let me know if one of these works for you - we may need to update the tutorial you linked to if something's wrong.
We've updated out Gitlab to version 13.6.3, but that did not fix anything.
- This did nothing. Same error logs.
- Same as 1, did not change anything.
I do have to mention that we have our own CA. Received certificates from outgoing requests get swapped out for certificates which are signed by our CA. Not sure if we're getting any errors because of self-signed certificates. I've installed our CA inside our image so that should work.
Running npm run semantic-release
outside of the CI/CD to try and see if that works keeps prompting for a username and password. That's probably not normal behaviour either.
@aldrashan Thanks for giving those a try.
Running
npm run semantic-release
outside of the CI/CD to try and see if that works keeps prompting for a username and password. That's probably not normal behaviour either.
When you run this locally, are the environment variables that are available in CI also available locally? To better simulate the CI environment, you may need to set the relevant variables locally, e.g:
GITLAB_TOKEN="<your GitLab token here>" NPM_TOKEN="<your NPM token here>" GITLAB_URL="https://gitlab.atsgroep.be/" GITLAB_PREFIX="/api/v4" npm run semantic-release
Setting those parameters locally helps with the infinite credential prompts, but still throws the error.
[6:37:11 AM] [semantic-release] › ℹ Running semantic-release version 17.3.0
semantic-release:config load config from: /vanguard/.releaserc.json +0ms
semantic-release:config options values: {
semantic-release:config branches: [ 'master' ],
semantic-release:config repositoryUrl: 'https://gitlab.atsgroep.be/DEV/vanguard.git',
semantic-release:config tagFormat: 'v${version}',
semantic-release:config plugins: [
semantic-release:config '@semantic-release/commit-analyzer',
semantic-release:config '@semantic-release/release-notes-generator',
semantic-release:config '@semantic-release/gitlab',
semantic-release:config '@semantic-release/npm',
semantic-release:config [ '@semantic-release/git', [Object] ]
semantic-release:config ],
semantic-release:config _: [],
semantic-release:config debug: true,
semantic-release:config '$0': 'node_modules/.bin/semantic-release'
semantic-release:config } +13ms
semantic-release:plugins options for @semantic-release/gitlab/verifyConditions: {} +0ms
[6:37:12 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/gitlab"
semantic-release:plugins options for @semantic-release/npm/verifyConditions: {} +1ms
[6:37:12 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
semantic-release:plugins options for @semantic-release/git/verifyConditions: {
semantic-release:plugins assets: [ 'package.json' ],
semantic-release:plugins message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
semantic-release:plugins } +2ms
[6:37:12 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/git"
semantic-release:plugins options for @semantic-release/commit-analyzer/analyzeCommits: {} +2ms
[6:37:12 AM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
semantic-release:plugins options for @semantic-release/release-notes-generator/generateNotes: {} +1ms
[6:37:12 AM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
semantic-release:plugins options for @semantic-release/npm/prepare: {} +0ms
[6:37:12 AM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/npm"
semantic-release:plugins options for @semantic-release/git/prepare: {
semantic-release:plugins assets: [ 'package.json' ],
semantic-release:plugins message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
semantic-release:plugins } +1ms
[6:37:12 AM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/git"
semantic-release:plugins options for @semantic-release/gitlab/publish: {} +1ms
[6:37:12 AM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/gitlab"
semantic-release:plugins options for @semantic-release/npm/publish: {} +0ms
[6:37:12 AM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/npm"
semantic-release:plugins options for @semantic-release/npm/addChannel: {} +1ms
[6:37:12 AM] [semantic-release] › ✔ Loaded plugin "addChannel" from "@semantic-release/npm"
[6:37:12 AM] [semantic-release] › ⚠ This run was not triggered in a known CI environment, running in dry-run mode.
semantic-release:get-git-auth-url Verifying ssh auth by attempting to push to https://gitlab.atsgroep.be/DEV/vanguard.git +0ms
Username for 'https://gitlab.atsgroep.be':
Password for 'https://gitlab.atsgroep.be':
semantic-release:git Error: Command failed with exit code 128: git push --dry-run --no-verify https://gitlab.atsgroep.be/DEV/vanguard.git HEAD:master
semantic-release:git remote: HTTP Basic: Access denied
semantic-release:git fatal: Authentication failed for 'https://gitlab.atsgroep.be/DEV/vanguard.git/'
semantic-release:git at makeError (/vanguard/node_modules/semantic-release/node_modules/execa/lib/error.js:59:11)
semantic-release:git at handlePromise (/vanguard/node_modules/semantic-release/node_modules/execa/index.js:114:26)
semantic-release:git at processTicksAndRejections (internal/process/task_queues.js:93:5)
semantic-release:git at async verifyAuth (/vanguard/node_modules/semantic-release/lib/git.js:207:5)
semantic-release:git at async module.exports (/vanguard/node_modules/semantic-release/lib/get-git-auth-url.js:91:5)
semantic-release:git at async run (/vanguard/node_modules/semantic-release/index.js:56:27)
semantic-release:git at async module.exports (/vanguard/node_modules/semantic-release/index.js:260:22)
semantic-release:git at async module.exports (/vanguard/node_modules/semantic-release/cli.js:55:5) +0ms
semantic-release:get-git-auth-url SSH key auth failed, falling back to https. +1s
semantic-release:get-git-auth-url Found 2 credentials in environment, trying all of them +0ms
semantic-release:get-git-auth-url Using "GIT_CREDENTIALS" to authenticate +507ms
semantic-release:get-tags found tags for branch master: [] +0ms
[6:37:15 AM] [semantic-release] › ⚠ Run automated release from branch master on repository https://[secure]@gitlab.atsgroep.be/DEV/vanguard.git in dry-run mode
[6:37:15 AM] [semantic-release] › ✔ Allowed to push to the Git repository
[6:37:15 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/gitlab"
semantic-release:gitlab apiUrl: 'https://gitlab.atsgroep.be/api/v4' +0ms
semantic-release:gitlab repoId: 'DEV/vanguard' +0ms
[6:37:15 AM] [semantic-release] [@semantic-release/gitlab] › ℹ Verify GitLab authentication (https://gitlab.atsgroep.be/api/v4)
[6:37:15 AM] [semantic-release] › ✖ Failed step "verifyConditions" of plugin "@semantic-release/gitlab"
[6:37:15 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/npm"
[6:37:15 AM] [semantic-release] [@semantic-release/npm] › ℹ Verify authentication for registry https://gitlab.atsgroep.be/api/v4/projects/196/packages/npm/
[6:37:15 AM] [semantic-release] [@semantic-release/npm] › ℹ Reading npm config from /root/.npmrc
[6:37:15 AM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/npm"
[6:37:15 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/git"
[6:37:15 AM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/git"
[6:37:15 AM] [semantic-release] › ✖ An error occurred while running semantic-release: TypeError: Cannot read property 'statusCode' of undefined
at module.exports (/vanguard/node_modules/@semantic-release/gitlab/lib/verify.js:62:26)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async verifyConditions (/vanguard/node_modules/@semantic-release/gitlab/index.js:9:3)
at async validator (/vanguard/node_modules/semantic-release/lib/plugins/normalize.js:34:24)
at async /vanguard/node_modules/semantic-release/lib/plugins/pipeline.js:37:34
at async Promise.all (index 0)
at async next (/vanguard/node_modules/p-reduce/index.js:16:18) {
pluginName: '@semantic-release/gitlab'
}
AggregateError:
TypeError: Cannot read property 'statusCode' of undefined
at module.exports (/vanguard/node_modules/@semantic-release/gitlab/lib/verify.js:62:26)
at async verifyConditions (/vanguard/node_modules/@semantic-release/gitlab/index.js:9:3)
at async validator (/vanguard/node_modules/semantic-release/lib/plugins/normalize.js:34:24)
at async /vanguard/node_modules/semantic-release/lib/plugins/pipeline.js:37:34
at async Promise.all (index 0)
at async next (/vanguard/node_modules/p-reduce/index.js:16:18)
at /vanguard/node_modules/semantic-release/lib/plugins/pipeline.js:54:11
at async Object.pluginsConf.semantic-release --debug
npm ERR! Exit status 1
@aldrashan Interesting, looks like it's failing on this line:
https://github.com/semantic-release/gitlab/blob/e52f7397cdbb7ada64f079e06c4744a5b9e4bf99/lib/verify.js#L62
which is already inside a catch
statement 🤔
This makes me think something unexpected is going on with the network request. This seems like a likely candidate:
I do have to mention that we have our own CA. Received certificates from outgoing requests get swapped out for certificates which are signed by our CA. Not sure if we're getting any errors because of self-signed certificates. I've installed our CA inside our image so that should work.
Either way, this code shouldn't assume that error.response
is always present, since it's obviously not! I'll put together a quick PR. This won't fix this issue, but it might handle the error a little better.
Also, this looks like the same root issue as https://github.com/semantic-release/gitlab/issues/212, which mentions:
During verification process, when facing SSL problems, the following Error occurs:
So an SSL issue seems like a likely culprit here as well.
Opened https://github.com/semantic-release/gitlab/pull/214.
@aldrashan #214 has been merged, so if you upgrade @semantic-release/gitlab
to version 6.0.9
or later, you might get a better error message 🤞
If this ends up being a problem specific to your setup, would you mind closing this issue? 🙇
I'll update it first thing tomorrow and try it out. Will report back.
Finally got docker working again after it gave up the ghost... Seems to be an issue with certificates, indeed.
[6:39:02 AM] [semantic-release] › ✖ An error occurred while running semantic-release: { GotError: unable to verify the first certificate
at onError (/builds/DEV/vanguard/node_modules/got/dist/source/request-as-event-emitter.js:140:29)
at handleRequest (/builds/DEV/vanguard/node_modules/got/dist/source/request-as-event-emitter.js:173:17)
at process._tickCallback (internal/process/next_tick.js:68:7)
at TLSSocket.onConnectSecure (_tls_wrap.js:1058:34)
at TLSSocket.emit (events.js:198:13)
at TLSSocket._finishInit (_tls_wrap.js:636:8)
name: 'RequestError',
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
pluginName: '@semantic-release/gitlab' }
{ AggregateError:
GotError: unable to verify the first certificate
at onError (/builds/DEV/vanguard/node_modules/got/dist/source/request-as-event-emitter.js:140:29)
at handleRequest (/builds/DEV/vanguard/node_modules/got/dist/source/request-as-event-emitter.js:173:17)
at /builds/DEV/vanguard/node_modules/semantic-release/lib/plugins/pipeline.js:54:11 name: 'AggregateError' }npm ERR! code ELIFECYCLE
Will pass it along to our network/system admin.
@aldrashan Nice, at least that error message is much more informative 👍
@aldrashan Hi, Have you managed to tackle this issue with certificates? We've faced the same problem
@aldrashan Hi, Have you managed to tackle this issue with certificates? We've faced the same problem
Nope. Never heard from our admins again. I don't have the access rights to go sniffle around in our network settings, so I'm not using this currently.
I’ve encountered the same issue. Locally, I am not able to successfully run git ls-remote --heads $url
unless the token is added to the URL as follows:
git ls-remote --heads https://oauth2:[email protected]/path/to/repo.git
How can I fix this in the config? Without fixing this I am not able to use semantic-release
with Gitlab CI successfully.
Hi Team,
I am facing similar issue, could please throw some light?
$ npx semantic-release [9:51:39 AM] [semantic-release] › ℹ Running semantic-release version 18.0.0 [9:51:39 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/changelog" [9:51:39 AM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/gitlab" [9:51:39 AM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer" [9:51:39 AM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator" [9:51:39 AM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/changelog" [9:51:39 AM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/gitlab" [9:51:41 AM] [semantic-release] › ✔ Run automated release from branch master on repository https://gitlab-ci-token:[secure]@gitlab.rosetta.ericssondevops.com/sa-iot-cvc/teams/zephyr/changelog-testing.git [9:51:41 AM] [semantic-release] › ✔ Allowed to push to the Git repository [9:51:41 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/changelog" [9:51:41 AM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/changelog" [9:51:41 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/gitlab" [9:51:41 AM] [semantic-release] [@semantic-release/gitlab] › ℹ Verify GitLab authentication (https://gitlab.rosetta.ericssondevops.com/api/v4) [9:51:41 AM] [semantic-release] › ✖ Failed step "verifyConditions" of plugin "@semantic-release/gitlab" [9:51:41 AM] [semantic-release] › ✖ An error occurred while running semantic-release: RequestError: Unexpected token < in JSON at position 0 in "https://access.com/cdn-cgi/access/login/gitlab.devops.com?kid=df67c81e77f936b99757efc9e2afabd12b849b67aa6389703d7ae20de9fe5&redirect_url=%2Fapi%2Fv4%2Fprojs%2Fsa-iot-%252Fteams%yr%252Fchangelog-testing&meta=eyJraWQiOiI0N2E5YmYwZTRmZWQxZjU2NTc2NDY5YzI1YmQ2ZTZlZjYwYmJlMWNhZGE1ODVjNmVmMzBjYjdhMDI5NTg1OWUxIiwiYWxnUlMyNTYiLCJ0eXAiOiJKV1QifQ.eyJzZXJ2aWNlX3Rva2VuX3N0YXR1cyI6ZmFsc2UsImlhdCI6MTYzNDU1MDcwMSwic2VydmljZV90b2tlbl9pZCI6IiIsImF1ZCI6ImRmNjdjODFlNzdmOTM2Yjk5NzU3ZWZjOWUyYWZhYmQxMmI4NDliNjdhYTYzODk3MDNkN2FlMjBhNjFkZTlmZTUiLCJpc19nYXRld2F5IjpmYWxzZSwibmJmIjoxNjM0NTUwNzAxLCJ0eXBlIjoibWV0YSIsImlzX3dhcnAiOmZhbHNlLCAKMiWw" at Object.parseBody [as default] (/builds/sa-iot-cvc/teams/zephyr/changelog-testing/node_modules/got/dist/source/as-promise/parse-body.js:22:15) at /builds/sa/teams/zr/changelog-testing/node_modules/got/dist/source/as-promise/index.js:158:40 at processTicksAndRejections (node:internal/process/task_queues:94:5) at async module.exports (/builds/sa-iot-cvc/teams/zephyr/changelog-testing/node_modules/@semantic-release/gitlab/lib/verify.js:52:11)
I am also getting the same error. Any solutions or hints? I tried NODE_EXTRA_CA_CERTS
, but no luck
Also, this looks like the same root issue as #212, which mentions:
During verification process, when facing SSL problems, the following Error occurs:
So an SSL issue seems like a likely culprit here as well.
Any hints how to fix this SSL issue? Thanks!
I was running into a similar issue with certificates and my GitLab CI and I had to update the certificates. I added the following lines to the before_script
section of my job
$ apt-get update
$ apt-get upgrade -y
$ apt-get install -y --no-install-recommends ca-certificates
I was facing a similar issue with certificates on my local GitLab, you have to force Node and Git ignore invalid self-signed ssl certificate with https.request.
How ignore invalid self-signed ssl certificate (node): (https://stackoverflow.com/questions/10888610/ignore-invalid-self-signed-ssl-certificate-in-node-js-with-https-request)
So you can just add the following lines to gitlab-ci.yaml in before_script section of your job:
before_script:
- export NODE_TLS_REJECT_UNAUTHORIZED=0
- export GIT_SSL_NO_VERIFY=1
Or If you have Dockerfile you add the following lines:
ENV NODE_TLS_REJECT_UNAUTHORIZED 0
ENV GIT_SSL_NO_VERIFY 1
Thanks for all the tips. I think there is nothing we can do in the plugin to prevent such issues, so I'm closing the issue.
Feel free to comment/reopen if I'm missing something.