首页 > 其他 > 详细

error: failed to push some refs to ‘git@xxx.git‘

时间:2019-03-21 18:46:43      阅读:196      评论:0      收藏:0      [点我收藏+]
【问题描述】:通过 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 ‘git@git.bd.com:new/bd.git‘

【排查分析】:语法没有问题,是提交到指定的分支,与以往没有不同
因为项目账号删除,即没有owner,而当前提交人员为developer,所以报错。
【解决方案】: 添加项目的owner,再次提交即可。

error: failed to push some refs to ‘git@xxx.git‘

原文:https://blog.51cto.com/zhaowl/2366843

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!