Trying to set up semantic-release/gitlab, I'm getting this in my GitLab logs,
Error: Command failed with exit code 128: git tag v1.0.0 2c30602010d7d9f26cc0880b988ff9de6405daa5
fatal: tag 'v1.0.0' already exists
at makeError (/builds/myProject/angular-validators/node_modules/semantic-release/node_modules/execa/lib/error.js:60:11)
at handlePromise (/builds/myProject/angular-validators/node_modules/semantic-release/node_modules/execa/index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async tag (/builds/myProject/angular-validators/node_modules/semantic-release/lib/git.js:224:3)
at async run (/builds/myProject/angular-validators/node_modules/semantic-release/index.js:191:5)
at async module.exports (/builds/myProject/angular-validators/node_modules/semantic-release/index.js:260:22)
at async module.exports (/builds/myProject/angular-validators/node_modules/semantic-release/cli.js:55:5) {
shortMessage: 'Command failed with exit code 128: git tag v1.0.0 2c30602010d7d9f26cc0880b988ff9de6405daa5',
command: 'git tag v1.0.0 2c30602010d7d9f26cc0880b988ff9de6405daa5',
But when I check out my project on GitLab,
https://gitlab/myGroup/myProject/-/tags
It shows no tags. When I view my pipline's output, I see
Getting source from Git repository
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /builds/myGroup/myProject/.git/
Checking out fc225500 as master...
Removing .npm/
Removing node_modules/
Skipping Git submodules setup
You need to change your "Git Strategy", to clone. There is no way to get past this error or clear the cache without doing this.
Find the instructions on the GitLab documentation for choosing a Git strategy. There are two methods they support detailed above,
GIT_STRATEGY
variable in the .gitlab-ci.yml
file.