解決辦法 not Signed-off-by author/committer/uploader in commit message footer

  • 2019 年 10 月 5 日
  • 筆記

版權聲明:本文為部落客原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接和本聲明。

本文鏈接:https://blog.csdn.net/weixin_42514606/article/details/100698801

現象

一個 Gerrit 是從已經 merge 的倉庫 回滾出來的一個,然後在上面修改,修改完了提交的時候發現一個錯誤

! [remote rejected] HEAD -> refs/drafts/stable/beryllium (not Signed-off-by author/committer/uploader in commit message footer)

對於gerrit 這個工具網上的解決方法是比較少的,看了官方有個解決方案。

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

大概說下, 就是這幾個原因

missing Signed-off-by in the commit message footer Signed-off-by is contained in the commit message footer but it』s neither from the author, committer nor uploaderSigned-off-by from the author, committer or uploader is contained in the commit message but not in the footer (last paragraph)

解決辦法

解決辦法就是

To be able to push your commits you have to update the commit messages as explained here so that they contain a Signed-off-by from the author, committer or uploader in the last paragraph. However it is important that you only add a Signed-off-by if you understand the semantics of the Signed-off-by and the commit applies to the rules that are connected with this footer.

通俗的講就是, 先 git commit --amend,然後把對應的用戶資訊加上去,格式如下 Signed-off-by: rikxiao <[email protected]>

最後再次push即可。