解決Gitlab倉庫developer無法push問題


進入settings=>repository=>protected branches里,修改Allowed to push為Developers + Maintainers 或者直接點擊Unprotect.

developer權限也可提交代碼

master分支下修改了文件,計划push,發現沒有權限

remote: GitLab: You are not allowed to push code to protected branches on this project.
! [remote rejected] master -> master (pre-receive hook declined)

 

修改文件並添加

git add .

git commit -m "m"

git checkout -b update_fastjosn_version  //新建分支

git push  //此處提示錯誤
git push --set-upstream origin update_fastjson_version  //再次OK了
可以看到push成功了,再登陸gitlab,新建一個merge request就行了,讓有merge權限的人merge一下。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM