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-12-04 GMT+08:00

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

Symptom

When you 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: Modify the Protected Branch Settings

On the repository details page, choose Settings > Policy Settings > Protected Branches to unprotect the branch. For details, see Protected Branches in the User Guide.

Figure 1 Editing Protected Branches
Figure 2 Setting a whitelist

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. For details, see Configuring Member Management in the User Guide.

Figure 3 Member list

Troubleshooting FAQs

more