I have stucked with one issues from last last 12 hours and not able to find a solution in gerrit.
I have installed test Gerrit instance "2.14.3". from last few hours, I am trying to find a submit button and failed badly. Tried many options and many reference in google but could not get Submit button Enabled.
Note, I am pushing the change via one registered user and trying to submit via admin user but "SUBMIT" button is not being displayed at all.
Few Quick Commands to check the senario
git clone http://13.126.209.78:8080/test1
curl -Lo .git/hooks/commit-msg http://13.126.209.78:8080/tools/hooks/commit-msg
touch file1.txt;git add .;git commit -m"adding first"
git push origin HEAD:refs/for/master
and Found No Submit button.
Any clue, where I am doing mistakes?
Here is the details of project.config
[project]
description = Access inherited by all other projects.
[receive]
requireContributorAgreement = false
requireSignedOffBy = false
requireChangeId = true
enableSignedPush = false
[submit]
mergeContent = true
[capability]
administrateServer = group Administrators
priority = batch group Non-Interactive Users
streamEvents = group Non-Interactive Users
[access "refs/*"]
read = group Administrators
read = group Anonymous Users
[access "refs/for/*"]
addPatchSet = group Registered Users
[access "refs/for/refs/*"]
push = group Registered Users
pushMerge = group Registered Users
[access "refs/heads/*"]
create = group Administrators
create = group Project Owners
forgeAuthor = group Registered Users
forgeCommitter = group Administrators
forgeCommitter = group Project Owners
push = group Administrators
push = group Project Owners
label-Code-Review = -2..+2 group Administrators
label-Code-Review = -2..+2 group Project Owners
label-Code-Review = -1..+1 group Registered Users
submit = group Administrators
submit = group Project Owners
editTopicName = +force group Administrators
editTopicName = +force group Project Owners
[access "refs/meta/config"]
exclusiveGroupPermissions = read
read = group Administrators
read = group Project Owners
create = group Administrators
create = group Project Owners
push = group Administrators
push = group Project Owners
label-Code-Review = -2..+2 group Administrators
label-Code-Review = -2..+2 group Project Owners
submit = group Administrators
submit = group Project Owners
[access "refs/tags/*"]
create = group Administrators
create = group Project Owners
createTag = group Administrators
createTag = group Project Owners
createSignedTag = group Administrators
createSignedTag = group Project Owners
[label "Code-Review"]
function = MaxWithBlock
defaultValue = 0
copyMinScore = true
copyAllScoresOnTrivialRebase = true
value = -2 This shall not be merged
value = -1 I would prefer this is not merged as is
value = 0 No score
value = +1 Looks good to me, but someone else must approve
value = +2 Looks good to me, approved
[label "Verified"]
function = MaxWithBlock
value = -1 Fails
value = 0 No score
value = +1 Verified
copyAllScoresIfNoCodeChange = true
Here is the details of gerrit.config
gerrit]
basePath = git
serverId = 99472c41-5ed3-411e-a42f-36fdd890ff96
canonicalWebUrl = http://ip-172-31-2-138.ap-south-1.compute.internal:8080/
[database]
type = h2
database = /opt/review_site/db/ReviewDB
[index]
type = LUCENE
[auth]
type = DEVELOPMENT_BECOME_ANY_ACCOUNT
[receive]
enableSignedPush = false
[sendemail]
smtpServer = localhost
[container]
user = root
javaHome = /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-2.b16.el7_4.x86_64/jre
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = http://*:8080/
[cache]
directory = cache
解决方案
There's no issue, everything is working as designed. The "Submit" button only is showed when the change is "Approved". In your case, you need to have "Code-Review +2" AND "Verified +1". You just have the first one. Click on the "Reply" button and add a "Verified +1" vote then the "Submit" button will show up.
Note: it's possible that you don't have permission to add a "Verified +1" vote, in this case you'll need to add permission to this first.