The git merge branch succeeds, but the push fails (remote: GitLab: You are not allowed to push code to protected branches on this project.)

After emergency repair and modification of the code, it is necessary to merge the branch to the master branch and push it to the online, but the merge succeeds, but the push fails, and the error is as follows:

➜  buzzextractor git:(master) git merge hotfix
Updating 4668fce..9527ae9
Fast-forward
 build_online_images.sh           | 2 +-
 extractor/buzz/lib/utils.py      | 2 +-
 extractor/conf/config.ini.bushu  | 2 +-
 extractor/conf/config.ini.online | 2 +-
 extractor/conf/config.ini.test   | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
➜  buzzextractor git:(master) git status 
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
➜  buzzextractor git:(master) git push origin master
Total 0 (delta 0), reused 0 (delta 0)
remote: GitLab: You are not allowed to push code to protected branches on this project.
To http://code.admaster.co/social-base/buzzextractor.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://[email protected]/social-base/buzzextractor.git'

After analysis and verification, it was found that I did not have the permission to merge the code, so the next step is to modify the permission.

Generally, as a developer, we do not have master permission, and only master has permission to merge code.

Modify the method, contact the administrator, open gitlab ===> setting ===> modify the member role, it is ok (because I am not an administrator, so there is no picture for everyone...)

Hope it helps you~

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325940658&siteId=291194637