When an author or committer’s email is not configured correctly, the commit is not associated with the correct user, and it is almost impossible to trace who is responsible for which piece of code.
To troubleshoot the root cause do the following:
Make sure the listed email address is your correct email address
A. Adding an email address to your GitHub account
- Follow the steps in this guide
- Re-run the policy
B. Updating your git configuration settings
- Open command line inside the git dir and type the following
$ git config --global user.email
Is the listed email address in the terminal is correct?
No - This is not my correct email address
Set your username and email address:
$ git config --global user.email firstname.lastname@example.org $ git config --global user.name "John Doe"
Yes - This is my correct email address
You have a local git config file inside your repository dir which overwrites your global git config - fix it
- Rewrite your commit(s) history
- Push the changes to the remote branch - Datree automatically scans your changes.