LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-verify-commit

Verify GPG signatures of commits

TLDR

Verify signed commit
$ git verify-commit [commit]
copy
Verify multiple commits
$ git verify-commit [commit1] [commit2]
copy
Show raw signature
$ git verify-commit --raw [commit]
copy
Verbose output
$ git verify-commit -v [commit]
copy

SYNOPSIS

git verify-commit [options] commit...

DESCRIPTION

git verify-commit checks GPG signatures of commits. It verifies that commits were signed with valid GPG keys, confirming the authenticity and integrity of the commit author.This command is useful in workflows that require signed commits for security or compliance purposes.

PARAMETERS

-v, --verbose

Print commit contents.
--raw
Print raw signature.

INSTALL

sudo apt install git
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix profile install nixpkgs#git
copy

CAVEATS

The signer's public key must already be available in the local GPG keyring (or configured SSH/X.509 verifier) for verification to succeed; an unknown key results in a failure even if the signature itself is valid. Exits non-zero if any given commit lacks a valid signature.

SEE ALSO

RESOURCES

Copied to clipboard
Kai