How to work with DCO
When Committing
You need to ensure that every commit message has a line "Signed-off-by: Your Legal Name <your-email@address>
", and while you could add that manually every time, here are the steps to follow so the computer can add it for you:
- Set your legal name in the git configuration:
git config user.name "Legal Name"
- Set your email in the git configuration:
git config user.email "email@address"
- Add the
-s
or--signoff
to allgit commit
invocations.- Add a git alias:
git config --global alias.c 'commit --signoff'
and then run "git c
" instead of "git commit
" - In IntelliJ
- Add a git alias:
When Merging
The merge or a PR must also have a DCO so we can know the entire repository is under the associated license.
- When Merging a Pull Request through "squash and merge", include the
Signed-off-by
lines from every contributor, and add one for you as the person merging.
When you have a DCO failure on your PR from DCO Bot
'
Click on that "Details" link and follow the instructions.
When you have a DCO failure on your PR from CI
On Circle CI you will see:
On Jenkins in the full Console Output you will see:
If this is only from CI and not from DCO Bot, then please contact a Maintainer, as it probably means that the master
branch has a commit that does not follow DCO which will necessitate a master
rebase.
Feel free to check out this tutorial for more help.
As per section 13.a of the Hyperledger Charter all code submitted to the Hyperledger Foundation needs to have a Developer Certificate of Origin (DCO) sign-off.
The sign off needs to be using your legal name, not a pseudonym. Git has a built-in mechanism to allow this with the -s
or --signoff
argument to git commit
command, providing your user.name
and user.email
have been setup correctly.
If you have any questions, you can reach us on Besu chat.