Branch Protection Settings #9526

Closed
opened 2025-11-02 08:41:49 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @dv996coding on GitHub (Sep 6, 2022).

Description

Hello. In the repository, click Settings to enter the branch permission settings. When the disable push feature of the main branch protection is enabled. Developers can still push the source code by switching to the main branch through the git tool. This disabling push function does not work, what is the reason for this?

Gitea Version

1.17.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

git version 2.24.0.windows.2

Operating System

Windows 11 Home Chinese Edition 21H2

How are you running Gitea?

I ran gitea through docker-compos, I chose the SQLite3 database, and the script file to run is as follows:
version: "3"

networks:
gitea:
external: false

services:
server:
image: gitea/gitea:1.17.1
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
restart: always
networks:
- gitea
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "222:22"

Database

SQLite

Originally created by @dv996coding on GitHub (Sep 6, 2022). ### Description Hello. In the repository, click Settings to enter the branch permission settings. When the disable push feature of the main branch protection is enabled. Developers can still push the source code by switching to the main branch through the git tool. This disabling push function does not work, what is the reason for this? ### Gitea Version 1.17.1 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version git version 2.24.0.windows.2 ### Operating System Windows 11 Home Chinese Edition 21H2 ### How are you running Gitea? I ran gitea through docker-compos, I chose the SQLite3 database, and the script file to run is as follows: version: "3" networks: gitea: external: false services: server: image: gitea/gitea:1.17.1 container_name: gitea environment: - USER_UID=1000 - USER_GID=1000 restart: always networks: - gitea volumes: - ./gitea:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" - "222:22" ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 08:41:49 -06:00
Author
Owner

@jolheiser commented on GitHub (Sep 6, 2022):

Can you reproduce this on https://try.gitea.io ?

Did you save the protection settings?

@jolheiser commented on GitHub (Sep 6, 2022): Can you reproduce this on https://try.gitea.io ? Did you _save_ the protection settings?
Author
Owner

@dv996coding commented on GitHub (Sep 6, 2022):

Hi, I saved it successfully. Ok, I'll test it on https://try.gitea.io/ to see if I can reproduce it?

@dv996coding commented on GitHub (Sep 6, 2022): Hi, I saved it successfully. Ok, I'll test it on https://try.gitea.io/ to see if I can reproduce it?
Author
Owner

@jolheiser commented on GitHub (Sep 6, 2022):

When testing on try, I still received remote: Gitea: Not allowed to push to protected branch main
I'm going to close this ticket, but feel free to re-open if you are able to reproduce.

Otherwise, feel free to stop by the forum, discord, matrix, etc if you have other questions. 🙂

@jolheiser commented on GitHub (Sep 6, 2022): When testing on try, I still received `remote: Gitea: Not allowed to push to protected branch main` I'm going to close this ticket, but feel free to re-open if you are able to reproduce. Otherwise, feel free to stop by the forum, discord, matrix, etc if you have other questions. 🙂
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9526