Progress:
TIER 2 · MODULE 26· Intermediate

git verify-tag

Validates signed tags. Releases love these.

🎯 What & why

Verify the GPG or SSH signature on an annotated tag. The release-engineering counterpart to verify-commit.

🧠 Mental model

Signed tags embed the signature in the tag object itself (not the commit). verify-tag extracts that block and hands it to gpg/ssh for validation against your trust store.

🛠️ Synopsis

git verify-tag [-v | --verbose] [--raw] [--format=<format>] <tag>...

Operates on tag objects, so lightweight tags (which have no object) cannot
be verified. Exit code 0 means every named tag carries a good signature.

🎚️ Switches & options

FlagWhat it does
-v / --verbosePrint the tag's contents (message, tagger, target) in addition to verification status.
--rawEmit the verifier's raw status lines for machine parsing.
--format=<format>Custom output using the same placeholders as for-each-ref (e.g. %(objectname), %(taggername)).
<tag>...One or more tag names; all must verify or the command exits non-zero.

💡 Use cases

🧪 Examples

Verify a release tag
git verify-tag v2.4.0
Verify with full content
git verify-tag -v v2.4.0
Verify all version tags
git tag -l 'v*' | xargs git verify-tag
Custom format
git verify-tag --format='%(tag) %(taggername) %(taggerdate:short)' v2.4.0

🎓 Recommendations

🪤 Common pitfalls

🔗 Related modules

📝 Quiz

Hit each option, then Check answers. Score is recorded; Next is always open.