Skip to content

Instantly share code, notes, and snippets.

@elasticdog
Created June 30, 2022 14:01
Show Gist options
  • Save elasticdog/72a369875cee8853cec2b3d9060f785e to your computer and use it in GitHub Desktop.
Save elasticdog/72a369875cee8853cec2b3d9060f785e to your computer and use it in GitHub Desktop.
Tagging and Signing Releases in Git

Tagging and Signing Releases in Git

Fish:

$ set -x GPG_TTY (tty)

Bash:

$ export GPG_TTY=$(tty)

This will tag and sign a release via GPG:

$ git tag -s v0.9.4 -m 'Release v0.9.4'

...the signature can be verified if you have the proper public key in your GPG keyring with:

$ git tag -v v0.9.4

You can see a tagged release with:

$ git show v0.9.4

Push your annotated tags to the remote repo with:

$ git push –tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment