Search code examples
githubgnupggpg-signature

How do I verify a GPG key with my commit email address on GitHub?


When I try to add a GPG key that uses my GitHub provided commit email address, it gives me an error that the email address is "Unverified." How should I fix this?

I followed the guide on GitHub for generating a GPG key and adding it to your account, which says:

Note: When asked to enter your email address, ensure that you enter the verified email address for your GitHub account. To keep your email address private, use your GitHub-provided no-reply email address. For more information, see "Verifying your email address" and "Setting your commit email address."

See this screenshot that shows the error:

Screenshot of GitHub SSH and GPG Keys settings page


Solution

  • Unlike when setting your commit email address, it is necessary to use the full noreply email address that GitHub provides. You can find it under the "Keep my email addresses private" section on the GitHub email settings page. This email address should look something like:

    [email protected]

    Use this email address to generate your GPG key instead of simply using "[email protected]."