[英]Can not create protected branch in this project in Gitlab
我在 gitlab 有一個項目。 我的同事在那里有維護者身份。 我有開發者身份。 他讓我用一個新的分支在那里推送一個文件。 然后合並請求,以便他可以檢查並接受。 但是當我推送時,我收到以下錯誤:
remote: GitLab: You are not allowed to create protected branches on this project.
To ".../..../myProject"
! [remote rejected] myBranch -> myBranch (pre-receive hook declined)
error: failed to push some refs to '.../..../myProject'
Here's what I did:
git clone .... // cloned the project as there were already files
// then added my files to the cloned project, created a new branch and did add
git add.
git commit -m "..."
git push origin myBranch
如果我沒記錯的話,問題是默認情況下 GitLab 只允許維護者創建新的受保護分支。
因此,這可能與 repo 中的權限有關,如果您在受保護的分支保護中使用通配符,則應檢查 GitLab。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.