Informationen zur Verifizierung einer Commit-Signatur

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.

Informationen zur Verifizierung einer Commit-Signatur

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

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

Default statuses

StatusBeschreibung
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

StatusBeschreibung
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-Administratoren können die obligatorische Commit-Signatur auf einem Branch erzwingen, um alle Commits zu blockieren, die nicht signiert und verifiziert sind. Weitere Informationen findest Du unter „Informationen zu geschützten Branches.“

Du kannst den Verifizierungsstatus Deines signierten Commits oder Tags auf GitHub überprüfen und sehen, warum Deine Commit-Signaturen möglicherweise nicht verifiziert sind. Weitere Informationen finden Sie unter „Verifizierungsstatus Ihrer Commit- und Tag-Signaturen überprüfen“.

GitHub will automatically use GPG to sign commits you make using the GitHub web interface, except for when you squash and merge a pull request that you are not the author of. Commits, die von GitHub signiert sind, werden auf GitHub einen verifizierten Status haben. Sie können die Signatur lokal mit dem unter https://github.com/web-flow.gpg verfügbaren öffentlichen Schlüssel verifizieren. 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-Verifizierung einer Commit-Signatur

Sie können GPG verwenden, um Commits mit einem GPG-Schlüssel zu signieren, den Sie selbst generieren.

GitHub verwendet OpenPGP-Bibliotheken, um zu bestätigen, dass Deine lokal signierten Commits und Tags kryptographisch mit einem öffentlichen Schlüssel verifizierbar sind, den Du zu Deinem GitHub-Konto hinzugefügt hast.

Um Commits mit GPG zu signieren und diese Commits auf GitHub verifizieren zu lassen, führe die folgenden Schritte aus:

  1. Suche nach vorhandenen GPG-Schlüsseln
  2. Generiere einen neuen GPG-Schlüssel
  3. Füge einen neuen GPG-Schlüssel zu Deinem GitHub-Konto hinzu
  4. Informiere Git über Deinen Signaturschlüssel
  5. Signiere Commits
  6. Signiere Tags

S/MIME-Verifizierung einer Commit-Signatur

Sie können S/MIME verwenden, um Commits mit einem von Ihrer Organisation ausgegebenen X.509-Schlüssel zu signieren.

GitHub verwendet das Debian-CA-Zertifikatspaket, den gleichen Trust Store, der auch von Mozilla-Browsern verwendet wird, um zu bestätigen, dass Deine lokal signierten Commits und Tags kryptographisch mit einem öffentlichen Schlüssel in einem vertrauenswürdigen Stammzertifikat verifizierbar sind.

Hinweis: Die S/MIME-Signaturüberprüfung ist in Git 2.19 oder höher verfügbar. Informationen zur Aktualisierung Deiner Git-Version findest Du auf der Git-Website..

Um Commits mit S/MIME zu signieren und diese Commits auf GitHub verifizieren zu lassen, führe die folgenden Schritte aus:

  1. Informiere Git über Deinen Signaturschlüssel
  2. Signiere Commits
  3. Signiere Tags

Du musst Deinen öffentlichen Schlüssel nicht auf GitHub hochladen.

Signaturverifizierung für Bots

Organisationen und GitHub Apps, bei denen Commit-Signaturen vorgeschrieben sind, können Bots für das Signieren von Commits verwenden. Wenn ein Commit oder Tag eine Bot-Signatur hat, die kryptografisch verifiziert werden kann, wird der Commit oder das Tag von GitHub als verifiziert gekennzeichnet.

Die Signaturverifizierung für Bots funktioniert nur, wenn die Anforderung als GitHub App oder Bot verifiziert und authentifiziert ist und keine benutzerdefinierten Informationen zum Autor, zum Beitragenden oder zur Signatur aufweist, also z. B. keine Commits-API.

Weiterführende Informationen

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

Oder, learn how to contribute.