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 Enterprise Server marks the commit or tag "Verified."
If a commit or tag has a signature that can't be verified, GitHub Enterprise Server marks the commit or tag "Unverified."
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."
您可以在 GitHub Enterprise Server 上检查已签名提交或标记的验证状态，并查看提交签名未验证的原因。 有关详细信息，请参阅“检查提交和标记签名验证状态”。
If a site administrator has enabled web commit signing, GitHub Enterprise Server will automatically use GPG to sign commits you make using the web interface. Commits signed by GitHub Enterprise Server will have a verified status. You can verify the signature locally using the public key available at
https://HOSTNAME/web-flow.gpg. For more information, see "Configuring web commit signing."
You can use GPG to sign commits with a GPG key that you generate yourself.
GitHub Enterprise Server 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 your GitHub Enterprise Server instance.
To sign commits using GPG and have those commits verified on GitHub Enterprise Server, follow these steps:
- Check for existing GPG keys
- Generate a new GPG key
- Add a GPG key to your GitHub account
- Tell Git about your signing key
- Sign commits
- Sign tags
You can use S/MIME to sign commits with an X.509 key issued by your organization.
GitHub Enterprise Server 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.
注意：S/MIME 签名验证可用于 Git 2.19 或更高版本。 若要更新 Git 版本，请参阅 Git 网站。
To sign commits using S/MIME and have those commits verified on GitHub Enterprise Server, follow these steps:
You don't need to upload your public key to GitHub Enterprise Server.