How to Limit Git Tag Push

Asked 1 years ago, Updated 1 years ago, 432 views

GitLab is configured to release with a tag beginning with "v" to the default branch.
Build/test/deploy by pushing a tag like v1.0.0 to the main branch.

Users with developer privileges can create work branches and merge requests.
You can also push a commit or tag to a working branch.

Is there a good way to ban the following two cases?

  • User with developer privileges pushes v1.0.0 tag
  • Mistakely push v1.0.0 tags other than the default branch

The tag has a unique name regardless of branch, so even if it is a work branch, it will be a problem if it is used without permission.

git github gitlab

2022-09-30 22:01

1 Answers

GitLab allows you to configure the Maintenance screen (EE/CE common feature).

GitHub is via API, but now it seems to be available as a public beta feature.

Hifolks! Just a note to say we've moved this to public beta so the feature should be available for all public repositories on GitHub and private repositories on pay plans.

Both are methods of configuring tag name patterns to be protected by glob.


2022-09-30 22:01

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.