Help Center/ CodeArts Repo/ FAQs/ Troubleshooting/ Message "You are not allowed to push code to protected branches on this project" is Displayed
Updated on 2023-09-06 GMT+08:00

Message "You are not allowed to push code to protected branches on this project" is Displayed

Symptom

When a user attempts to push code to a repository, the message You are not allowed to push code to protected branches on this project is displayed.

Analysis

The branch to be pushed is a protected, and the user does not have the permissions to push code to the branch.

Solution 1: Unprotect the Branch

On the repository details page, choose Settings > Policy Settings > Protected Branches to unprotect the branch.

Solution 2: Change the Role of the User in the Repository

Go to the CodeArts Repo details page, click the Members tab page, search for the target user, click the administrator setting icon , and modify the repository member role to set the member as the repository administrator.