`

gitpush代码报错

    博客分类:
  • git
阅读更多
$ git push origin mybranch-0001
Counting objects: 3, done.
Writing objects: 100% (3/3), 215 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: You are not allowed to push code to protected branches on this project.
To https://github.com/bytedance/nnproxy
 ! [remote rejected] mybranch-0001 -> mybranch-0001 (pre-receive hook declined)
error: failed to push some refs to 'http://git.foo.com/xjbl/foo.git'

有一种可能是developer角色没有往默认分支提交代码的权限,导致被rejected。需要master角色在新工程里面创建一个默认的master分支之后,developer就可以创建其他分支,提交代码并可以合并代码到master主分支上。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics