Ask Your Question

Unable to send code into Gerrit for code review

asked 2016-04-04 07:35:38 -0600

Bhargavi gravatar image

updated 2016-04-04 07:47:54 -0600

I need to send code to Gerrit for review.

Executed the below command for the sending the code into Gerrit.

Command: “git review”

Got an error “missing or invalid Change-Id line format in commit message footer” after the execution of the above command.

Please find the below detailed error:

root@bhagi:~/glance/python-glanceclient# git review
Password for '':
remote: Processing changes: refs: 1, done
remote: ERROR: missing or invalid Change-Id line format in commit message footer
remote: Hint: To automatically insert Change-Id, install the hook:
remote:   gitdir=$(git rev-parse --git-dir); scp -p -P 29418 ${gitdir}/hooks/
remote: And then amend the commit:
remote:   git commit --amend
! [remote rejected] HEAD -> refs/publish/master/bug/1555662 (missing or invalid Change-Id line format in commit message footer)
error: failed to push some refs to ''

Please help me to resolve the issue.

Thanks in advance.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2016-04-04 22:22:04 -0600

hieulq gravatar image

Please following (this guide)

You are missing remote branch named gerrit in upstream, run the command

git review -s

in each repo you want to start working. This command create a gerrit branch and took an commit hook to append ChangeId each time you commit. So, basically the workflow is:

git clone <OpenStack repo>
git review -s
<make some changes>
git add <changed file>
git commit -a or git commit --amend
git review
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-04-04 07:35:38 -0600

Seen: 319 times

Last updated: Apr 04 '16