SUGGESTION - remote: GitLab: You are not allowed to push code to this project.
Hi, can you guys possibly add the username for the user that's getting this error message upon trying to push to a remote repo? Take a look to a scenario that I encountered today, and that took me quite some time to figure out if it was not an issue caused by gitlab or by the latest update, altough i wasn't sure at first and even tried to unprotect the branch - even though I got Master access in that repo, and Developers can push was also marked for the branch.
We're using cmake to build projects, and some built-in credentials to clone some of our dependencies when building the project. The problem is that the credentials got corrupted somehow - more likely wrong credentials were cached by git. My conclusion was that the credential.helper was somehow trying to use the incorrect user/password combination, which of course did not have rights to push to the project. The problem was I couldn't push to any project, any branch, my git was completely broken and gitlab didn't help at all with that generic error message. Even if I specified the correct username in the remote URL, it was still trying to use the 'build' user for pushing to the repo.
C:\workspace\apps\QOR>git push origin temp Counting objects: 9, done. Delta compression using up to 8 threads. Compressing objects: 100% (8/8), done. Writing objects: 100% (9/9), 891 bytes | 0 bytes/s, done. Total 9 (delta 6), reused 0 (delta 0) remote: GitLab: You are not allowed to push code to this project. To http://gitlab.xxxx.com/eborsos/QOR.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'http://gitlab.xxxx.com/eborsos/QOR.git'
What I wanted to ask for was if it was somehow possible to include the username which is not allowed to push to that repository, something like:
remote: GitLab: User 'build' is not allowed to push code to this project.
This would have been a lot more helpful, I could have probably figured it out sooner that something is wrong with the credentials, even tough the remote repository was set to http:://eborsos@gitlab.xxxx.com/eborsos/QOR.git .
I hope everyone finds this addition useful and you consider adding it in the next major release.
Thank you, Eduard.