Skip to main content
GitHub Docs
  • All products
  • Authentication
    • Account security
      • Authentication to GitHub
      • Create a strong password
      • Update access credentials
      • Create a PAT
      • Reviewing your SSH keys
      • Deploy keys
      • Authorizing OAuth Apps
      • Authorizing GitHub Apps
      • Authorized integrations
      • Third-party applications
      • Review OAuth apps
      • Token expiration
      • Security log
      • Remove sensitive data
      • About anonymized URLs
      • GitHub's IP addresses
      • SSH key fingerprints
      • Sudo mode
      • Unauthorized access
    • Secure your account with 2FA
      • About 2FA
      • Configure 2FA
      • Configure 2FA recovery
      • Access GitHub with 2FA
      • Recover an account with 2FA
      • Change 2FA delivery method
      • Countries supporting SMS
      • Disable 2FA
    • Connect with SSH
      • About SSH
      • Check for existing SSH key
      • Generate new SSH key
      • Add a new SSH key
      • Test your SSH connection
      • SSH key passphrases
    • Troubleshooting SSH
      • Use SSH over HTTPS port
      • Recover SSH key passphrase
      • Deleted or missing SSH keys
      • Permission denied (publickey)
      • Error: Bad file number
      • Error: Key already in use
      • Permission denied other-user
      • Permission denied other-repo
      • Agent failure to sign
      • ssh-add: illegal option -- K
      • SSL certificate problem
      • Error: Unknown key type
      • SSH key audit
    • Verify commit signatures
      • Commit signature verification
      • Displaying verification for all commits
      • Existing GPG keys
      • Generating a new GPG key
      • Add a GPG key
      • Tell Git your signing key
      • Associate email with GPG key
      • Signing commits
      • Signing tags
    • Troubleshoot verification
      • Check verification status
      • Use verified email in GPG key
  • Authentication/
  • Verify commit signatures/
  • Commit signature verification
 
GitHub Docs
  • Authentication/
  • Verify commit signatures/
  • Commit signature verification
Authentication
    • Get started
    • Account and profile
    • Authentication
    • Repositories
    • Enterprise administrators
    • Billing and payments
    • Site policy
    • Organizations
    • Code security
    • Pull requests
    • GitHub Issues
    • GitHub Actions
    • GitHub Copilot
    • GitHub Codespaces
    • GitHub Packages
    • Search on GitHub
    • Developers
    • REST API
    • GraphQL API
    • GitHub CLI
    • GitHub Discussions
    • GitHub Sponsors
    • Building communities
    • GitHub Pages
    • Education
    • GitHub Desktop
    • GitHub Support
    • Atom
    • Electron
    • CodeQL
    • npm
Free, Pro, & Team
    • Free, Pro, & Team
    • Enterprise Cloud
    • Enterprise Server 3.6
    • Enterprise Server 3.5
    • Enterprise Server 3.4
    • Enterprise Server 3.3
    • Enterprise Server 3.2
    • GitHub AE
    • All Enterprise Server releases
    • About versions

 

About commit signature verification

In this article

  • About commit signature verification
  • GPG commit signature verification
  • S/MIME commit signature verification
  • Signature verification for bots
  • Further reading

Using GPG or S/MIME, you can sign tags and commits locally. These tags or commits are marked as verified on GitHub so other people can be confident that the changes come from a trusted source.

About commit signature verification

You can sign commits and tags locally, to give other people confidence about the origin of a change you have made. If a commit or tag has a GPG or S/MIME signature that is cryptographically verifiable, GitHub marks the commit or tag "Verified" or "Partially verified."

Verified commit

Commits and tags have the following verification statuses, depending on whether you have enabled vigilant mode. By default vigilant mode is not enabled. For information on how to enable vigilant mode, see "Displaying verification statuses for all of your commits."

Note: Vigilant mode is currently in beta and subject to change.

Signing commits differs from signing off on a commit. For more information about signing off on commits, see "Managing the commit signoff policy for your repository."

Default statuses

StatusDescription
VerifiedThe commit is signed and the signature was successfully verified.
UnverifiedThe commit is signed but the signature could not be verified.
No verification statusThe commit is not signed.

Signature verification for rebase and merge

When using the Rebase and Merge option on a pull request, it's important to note that the commits in the head branch are added to the base branch without commit signature verification. When you use this option, GitHub creates a modified commit, using the data and content of the original commit. This means that GitHub didn't truly create this commit, and can't therefore sign it as a generic system user. GitHub doesn't have access to the committer's private signing keys, so it can't sign the commit on the user's behalf.

A workaround for this is to rebase and merge locally, and then push the changes to the pull request's base branch.

For more information, see "Rebasing and merging your commits."

Statuses with vigilant mode enabled

StatusDescription
VerifiedThe commit is signed, the signature was successfully verified, and the committer is the only author who has enabled vigilant mode.
Partially verifiedThe commit is signed, and the signature was successfully verified, but the commit has an author who: a) is not the committer and b) has enabled vigilant mode. In this case, the commit signature doesn't guarantee the consent of the author, so the commit is only partially verified.
UnverifiedAny of the following is true:
- The commit is signed but the signature could not be verified.
- The commit is not signed and the committer has enabled vigilant mode.
- The commit is not signed and an author has enabled vigilant mode.

Repository administrators can enforce required commit signing on a branch to block all commits that are not signed and verified. For more information, see "About protected branches."

You can check the verification status of your signed commits or tags on GitHub and view why your commit signatures might be unverified. For more information, see "Checking your commit and tag signature verification status."

GitHub will automatically use GPG to sign commits you make using the web interface. Commits signed by GitHub will have a verified status. You can verify the signature locally using the public key available at https://github.com/web-flow.gpg. The full fingerprint of the key is 5DE3 E050 9C47 EA3C F04A 42D3 4AEE 18F8 3AFD EB23.

You can optionally choose to have GitHub sign commits you make in GitHub Codespaces. For more information about enabling GPG verification for your codespaces, see "Managing GPG verification for GitHub Codespaces."

GPG commit signature verification

You can use GPG to sign commits with a GPG key that you generate yourself.

GitHub uses OpenPGP libraries to confirm that your locally signed commits and tags are cryptographically verifiable against a public key you have added to your account on GitHub.com.

To sign commits using GPG and have those commits verified on GitHub, follow these steps:

  1. Check for existing GPG keys
  2. Generate a new GPG key
  3. Add a GPG key to your GitHub account
  4. Tell Git about your signing key
  5. Sign commits
  6. Sign tags

S/MIME commit signature verification

You can use S/MIME to sign commits with an X.509 key issued by your organization.

GitHub uses the Debian ca-certificates package, the same trust store used by Mozilla browsers, to confirm that your locally signed commits and tags are cryptographically verifiable against a public key in a trusted root certificate.

Note: S/MIME signature verification is available in Git 2.19 or later. To update your version of Git, see the Git website.

To sign commits using S/MIME and have those commits verified on GitHub, follow these steps:

  1. Tell Git about your signing key
  2. Sign commits
  3. Sign tags

You don't need to upload your public key to GitHub.

Signature verification for bots

Organizations and GitHub Apps that require commit signing can use bots to sign commits. If a commit or tag has a bot signature that is cryptographically verifiable, GitHub marks the commit or tag as verified.

Signature verification for bots will only work if the request is verified and authenticated as the GitHub App or bot and contains no custom author information, custom committer information, and no custom signature information, such as Commits API.

Further reading

  • "Signing commits"
  • "Signing tags"
  • "Troubleshooting commit signature verification"

Did this doc help you?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.

Still need help?

Ask the GitHub community
Contact support
  • © 2022 GitHub, Inc.
  • Terms
  • Privacy
  • Security
  • Status
  • Help
  • Contact GitHub
  • Pricing
  • Developer API
  • Training
  • Blog
  • About