remote: GitLab: You are not allowed to push code to protected branches on this project.

信铁寒胜發表於2024-12-03

1、說明你沒有許可權,把程式碼推送到這個分支

warning: redirecting to http://xxxx.git/
Enumerating objects: 14, done.
Counting objects: 100% (14/14), done.
Delta compression using up to 12 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 2.36 KiB | 2.36 MiB/s, done.
Total 8 (delta 6), reused 0 (delta 0), pack-reused 0
remote: GitLab: You are not allowed to push code to protected branches on this project.
To http://xxxxx
! [remote rejected]   main -> main (pre-receive hook declined)
error: failed to push some refs to 'http://xxxxx'  

解決方法:讓專案管理給你開發合併的許可權,就可以了

相關文章