1. 程式人生 > >error: failed to push some refs to ‘[email protected]

error: failed to push some refs to ‘[email protected]

rem error: 提交 del 通過 mas 報錯 bject branch

【問題描述】:通過 git push -u origin master 提交代碼時出現如下報錯:

##git push -u origin master
Enumerating objects: 96, done.
Counting objects: 100% (96/96), done.
Delta compression using up to 4 threads
Compressing objects: 100% (74/74), done.
Writing objects: 100% (74/74), 93.61 KiB | 3.23 MiB/s, done.
Total 74 (delta 33), reused 0 (delta 0)
remote: GitLab: You are not allowed to push code to protected branches on this project.
To git.bd.com:new/bd.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ‘[email protected]:new/bd.git‘

【排查分析】:語法沒有問題,是提交到指定的分支,與以往沒有不同
因為項目賬號刪除,即沒有owner,而當前提交人員為developer,所以報錯。
【解決方案】: 添加項目的owner,再次提交即可。

error: failed to push some refs to ‘[email protected]