# Gitea 1.21.2 版本分支保护完全无效

**URL:** <https://forum.gitea.com/t/gitea-1-21-2/8348>\
**Category:** 中文求助(Chinese Only)\
**Created:** [December 21, 2023, 9:22am UTC](https://forum.gitea.com/t/gitea-1-21-2/8348 "2023-12-21T09:22:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rookiefiend](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/rookiefiend/32/4289_2.png) [@rookiefiend](https://forum.gitea.com/u/rookiefiend)\
**Post date:** [December 21, 2023, 9:22am UTC](https://forum.gitea.com/t/gitea-1-21-2/8348/1 "2023-12-21T09:22:35Z")

</div>

gitea arm64 架构 1.21.2 版本，分支保护完全无效  
镜像获取命令：docker pull --platform linux/arm64 gitea/gitea:1.21.2

已尝试如下配置方式：

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/3/39515ae7d0965b82f740c9a7a1f17bf80f325743.png)

不添加受保护的文件模式  
选择白名单模式

但仍能推送并执行push -f 推送

---

<div class="post-metadata">

**Author:** ![hfghgakjd](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/hfghgakjd/32/6321_2.png) [@hfghgakjd](https://forum.gitea.com/u/hfghgakjd)\
**Post date:** [October 12, 2024, 2:32am UTC](https://forum.gitea.com/t/gitea-1-21-2/8348/2 "2024-10-12T02:32:53Z")

</div>

你好，这个问题你解决了吗？我也遇到这个问题了，找不到原因…

---

<div class="post-metadata">

**Author:** ![rookiefiend](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/rookiefiend/32/4289_2.png) [@rookiefiend](https://forum.gitea.com/u/rookiefiend)\
**Post date:** [October 13, 2024, 3:56am UTC](https://forum.gitea.com/t/gitea-1-21-2/8348/3 "2024-10-13T03:56:49Z")

</div>

解决了的，但有点忘了，我记得是配置规则的问题，你试试 {分支名} 这么写，加上大括号

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [November 15, 2024, 5:48am UTC](https://forum.gitea.com/t/gitea-1-21-2/8348/4 "2024-11-15T05:48:56Z")

</div>


