当前位置:   article > 正文

remote: GitLab:You are not allowed to force push code to a protected branch on this project_remote: gitlab: you are not allowed to force push

remote: gitlab: you are not allowed to force push code to a protected branch

1、强制推送失败,报错

git push -f origin master

remote: GitLab:You are not allowed to force push code to a protected branch on this project

Master分支被保护:

进入项目gitlab 网页版: 设置(Settings)-仓库(Repository) -- 保护分支(Protected Branches)(把保护的分支选择 unprotected)

再重新进行推送 git push -f origin master

Master分支重新加入保护:

进入项目gitlab 网页版: 设置(Settings)-仓库(Repository) -- 保护分支(Protected Branches)--选择分支,Allowed to merge,Allowed to push(把保护的分支选择protect )

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/184567?site
推荐阅读
相关标签
  

闽ICP备14008679号