Answer the question
In order to leave comments, you need to log in
Why does the Push commit command throw an error?
We use gerrit. Cloning the repository goes smoothly. But when I try to push this error:
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 281 bytes | 281.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2)
remote: Branch refs/heads/master:
remote: You are not allowed to perform this operation.
remote: To push into this reference you need 'Push' rights.
remote: User: ....
remote: Please read the documentation and contact an administrator
remote: if you feel the configuration is incorrect
remote: Processing changes: refs: 1, done
To ssh://..........com:...../path/to/repos
! [remote rejected] master -> master (prohibited by Gerrit: ref update access denied)
error: failed to push some refs to 'ssh://[email protected]:...../path/to/repos'
Answer the question
In order to leave comments, you need to log in
Thanks everyone for the advice.
In gerrit, because of the system with reviewers, you can't just go ahead and run "git push commit".
First you need to send it to the reviewers
. And then if the reviewer likes everything, he will push it to the main branch.
There was also a problem with "hooks". This was solved by a command suggested by git itself in the error message.
There was an error that the mail does not match (the git itself wrote what mail is needed and what is now). Decision:
git config --global user.email 'Почта'
git commit --amend --reset-author
Most likely, your Gerrit repository is configured in such a way that it prohibits pushing directly to master
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question