GitLab You are not allowed to push code to this project
在我使用的GitLab CE 10.6.4 有一个bug,当创建好一个空的项目后,用owner账号将本地项目作git push
,会遇到”You are not allowed to push code to this project“的错。
因为是空的项目,连master分支都还没有,所以其实并不是protect branch的原因。
这个问题的原因是在向gitlab作git push
时,读取的是在Windows上Manage Windows Credentials中的另一个错误的username,所以被gitlab拒绝了。
解决的方法是,在Manage Windows Credentials中删除原来的credentials,作git push
时会提示输入用户名和密码,输入owner的用户名和密码后,就可以git push成功了。
这应该是GitLab的一个设计缺陷,也就是GitLab假设在一个GitLab上,你总是只用一个账号来登陆。
参考文档:https://gitlab.com/gitlab-com/support-forum/issues/207
如果遇到类似的GitLab的权限问题(权限过大或过小或被拒绝时),都可以先检查Manage Windows Credentials中的gitlab的credential是不是错的。
还没有评论,来说两句吧...