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

【问题描述】:通过 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,再次提交即可。

猜你喜欢

转载自blog.51cto.com/zhaowl/2366843
今日推荐