Issue 3287: Applying patch to kernel
Status:  Invalid
Owner: ----
Closed:  Apr 2015
Reported by rahulgen...@gmail.com, Apr 9, 2015
Hello,

I want to apply a patch to android-kernel. I have downloaded the source code from:
https://android.googlesource.com/platform/manifest

This branch does not have the source code of kernel. Then i downloaded the code from git clone https://android.googlesource.com/kernel/common.git. But i am getting following issue while push the changes to source code.

To https://android.googlesource.com/kernel/common.git
 ! [remote rejected] android-3.10 -> android-3.10 (prohibited by Gerrit)
error: failed to push some refs to 'https://android.googlesource.com/kernel/common.git'

Please help to resolve this issue.
Apr 9, 2015
Project Member #1 david.pu...@sonymobile.com
What push command did you use?
Status: AwaitingInformation
Apr 9, 2015
#2 rahulgen...@gmail.com
Presently working in android-3.10 branch.

I used "git push" to submit the code. Alternatively i tried 
"git push origin android-3.10". Got the same error:
To https://android.googlesource.com/kernel/common.git
 ! [remote rejected] android-3.10 -> android-3.10 (prohibited by Gerrit)
error: failed to push some refs to 'https://android.googlesource.com/kernel/common.git'


Thanks,

Apr 9, 2015
Project Member #3 david.pu...@sonymobile.com
Simply using "git push" will not work unless you have access permissions to push directly to the repository, which you most likely do not.

You need to use the refs/for/branch syntax as described here:

https://gerrit-review.googlesource.com/Documentation/user-upload.html#push_create

i.e. something like:

git push origin HEAD:refs/for/android-3.10


To push changes to android-review you also need to have completed the license agreement:

https://android-review.googlesource.com/#/settings/agreements

Apr 9, 2015
Project Member #4 david.pu...@sonymobile.com
Rejecting.  Not a Gerrit defect.

Status: Invalid
Apr 9, 2015
#5 rahulgen...@gmail.com
Thanks for your reply. 

git push origin HEAD:refs/for/android-3.10 command gave below error:
 
 ! [remote rejected] HEAD -> refs/for/android-3.10 (not Signed-off-by author/committer/uploader in commit message footer)
error: failed to push some refs to 'https://android.googlesource.com/kernel/common.git'

My commit message include Signed-off-by field..
Do i need to perform other configuration also ?
Apr 9, 2015
Project Member #6 david.pu...@sonymobile.com
Make sure the email address used in the Signed-off-by footer matches the author, committer, or uploader's email address.

Apr 9, 2015
#7 rahulgen...@gmail.com
git config --list shows
user.email=rahul.khandelwal@spreadtrum.com
user.name=rahul.khandelwal

And my commit message also using the same email address:
Signed-off-by: rahul.khandelwal@spreadtrum.com


Apr 10, 2015
Project Member #8 david.pu...@sonymobile.com
1.  Make sure the format of the name and email address in the signed-off-by line matches that in the committer line.  In the one you've pasted it only includes the email address but not the name.

2.  Make sure the signed-off-by line is in the final paragraph of the commit message.
Apr 10, 2015
#9 rahulgen...@gmail.com
I have tried with the name also:
Signed-off-by: Rahul Khandelwal <rahul.khandelwal@spreadtrum.com>

and config list shows:
user.email=rahul.khandelwal@spreadtrum.com
user.name=Rahul Khandelwal

It is also giving the same error. Do i need to use commit_template ?
Apr 10, 2015
Project Member #10 david.pu...@sonymobile.com
Since I can't see your commit I can only guess at what's wrong.

The conditions under which this error is emitted are listed here:

https://gerrit-review.googlesource.com/Documentation/error-not-signed-off-by.html

Please double check that your commit satisfies all of these.

Since your git config name and email match the signed-off-by line that you've shown, I can only guess that you somehow haven't put the line in the final paragraph.

Note that "in the last paragraph" means there must be no blank lines between the signed-off-by line and any other following lines.

Apr 10, 2015
#11 rahulgen...@gmail.com
It is done..

Thanks for your help.. :)