About commit signature verification

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."

Nota: El modo vigilante se encuentra actualmente en beta y está sujeto a cambios.

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.

Statuses with vigilant mode enabled

EstadoDescripción
VerificadoLa confirmación está firmada, la firma se verificó con éxito y el confirmante es el único autor que ha habilitado el modo vigilante.
Verificado  parcialmenteLa confirmación se firmó y la firma se verificó con éxito, pero la confirmación tiene un autor que: a) no es el confirmante y b) habilitó el modo vigilante. En este caso, la firma de confirmación no garantiza un consentimiento del autor, así que la confirmación se verifica solo parcialmente.
Sin verificarCualquiera de los siguientes es cierto:
- La confirmación se firmó pero la firma no pudo verificarse.
- La confirmación no se firmó y el confirmante habilitó el modo vigilante.
- La confirmación no se firmó y un autor habilitó el modo vigilante.

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."

Puedes comprobar el estado de verificación de tus confirmaciones o etiquetas firmadas en GitHub y ver por qué las firmas de tu confirmación podrían no ser verificadas. Para obtener más información, consulta "Comprobar la confirmación y el estado de verificación de firma de la etiqueta".

GitHub will automatically use GPG to sign commits you make using the GitHub web interface. Commits signed by GitHub will have a verified status on GitHub. 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 Codespaces. For more information about enabling GPG verification for your codespaces, see "Managing GPG verification for 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 new 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.

Nota: la verificación de firma S/MIME está disponible desde Git 2.19 o posterior. Para actualizar tu versiíon de Git, consulta el sitio web de Git.

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

¿Te ayudó este documento?

Política de privacidad

¡Ayúdanos a hacer geniales estos documentos!

Todos los documentos de GitHub son de código abierto. ¿Notas algo que esté mal o que no sea claro? Emite una solicitud de cambios.

Haz una contribución

O, aprende cómo contribuir.