语义释放:致命:标签 'vX.Y.Z' 已经存在
semantic-release: fatal: tag 'vX.Y.Z' already exists
正在尝试设置 semantic-release/gitlab,我在我的 GitLab 日志中得到了这个,
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',
但是当我在 GitLab 上查看我的项目时,
https://gitlab/myGroup/myProject/-/tags
它没有显示标签。当我查看我的管道输出时,我看到
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
您需要更改您的“Git 策略”以进行克隆。如果不这样做,就无法解决此错误或清除缓存。
Find the instructions on the GitLab documentation for choosing a Git strategy。他们支持上面详述的两种方法,
- 您可以在项目设置中指定它(instructions on the doc page above)
- 或者通过在
.gitlab-ci.yml
文件中指定一个 GIT_STRATEGY
变量。
正在尝试设置 semantic-release/gitlab,我在我的 GitLab 日志中得到了这个,
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',
但是当我在 GitLab 上查看我的项目时,
https://gitlab/myGroup/myProject/-/tags
它没有显示标签。当我查看我的管道输出时,我看到
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
您需要更改您的“Git 策略”以进行克隆。如果不这样做,就无法解决此错误或清除缓存。
Find the instructions on the GitLab documentation for choosing a Git strategy。他们支持上面详述的两种方法,
- 您可以在项目设置中指定它(instructions on the doc page above)
- 或者通过在
.gitlab-ci.yml
文件中指定一个GIT_STRATEGY
变量。