问题
I need to be able to push to a repository but using the code-review feature. To push I am using tortoisegit for this, when pushing to master I get this error:
ssh://myusername@myorganization:29418/project ! [remote rejected] master -> master (can not update the reference as a fast forward) error: failed to push some refs to ssh://myusername@myorganization:29418/project
The only way I am able to push is by adding the Push permission to the group but this bypasses the code-review. How can I set up Gerrit so that it allows me to push for review?
I wasn't the person who set this up so I am having problems to understand the required permissions, I have read the ACL documentation of Gerrit but I don't have clear what I have to do.
Thanks in advance!
回答1:
Your permissions are probably right, but you should push to refs/for/master instead of master. For example,
git push ssh://myusername@myorganization:29418/project HEAD:refs/for/master
回答2:
And if you want to bypass the gerrit review and merge any change use heads instead of for. Command will be
git push ssh://myusername@myorganization:29418/project HEAD:refs/heads/master
来源:https://stackoverflow.com/questions/14566576/push-bypasses-gerrit-code-review-tortoisegit