git权限不够:Ask a project Owner or Maintainer to create a default branch

新仓库还未创建任何分支时,Developer角色时首次提交代码,抛如下异常

remote: GitLab:         
remote: A default branch (e.g. master) does not yet exist for galaxy/apache-jspf-project        
remote: Ask a project Owner or Maintainer to create a default branch:        
remote: 
remote:   http://192.168.8.9/galaxy/spf-project/-/project_members        
remote: 
error: failed to push some refs to 'http://192.168.8.9/galaxy/spf-project.git'
To http://192.168.8.9/galaxy/spf-project.git
!    refs/heads/master:refs/heads/master    [remote rejected] (pre-receive hook declined)
Done

无权限创建默认分支 ,解决办法有两个:

1.要管理员第一次推代码创建master分支。

2.把我改成Maintainer角色亦可

你可能感兴趣的:(java,git)