Bring attention to git config tag.gpgsign true for parity with auto-signing commits#43817
Conversation
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
git config tag.gpgsign true for parity with auto-signing commits
There was a problem hiding this comment.
Pull request overview
Adds a documentation tip to the “Signing tags” article to highlight tag.gpgsign configuration for automatically signing tags, aligning the article more closely with the “Signing commits” guidance.
Changes:
- Added a new
[!TIP]callout describing how to enable default tag signing viagit config tag.gpgsign true/--global.
| {% data reusables.gpg.desktop-support-for-commit-signing %} | ||
|
|
||
| > [!TIP] | ||
| > To configure your Git client to sign tags by default for a local repository, in Git versions 2.23.0 and above, run `git config tag.gpgsign true`. To sign all tags by default in any local repository on your computer, run `git config --global tag.gpgsign true`. |
There was a problem hiding this comment.
The TIP claims tag.gpgsign requires Git 2.23.0+, but the analogous TIP in signing-commits.md uses Git 2.0.0+ for commit.gpgsign. Since this PR’s stated goal is parity, either align the minimum Git version here with the commits article or add a reference/justification for why tag auto-signing has a different minimum supported version (to avoid misleading readers).
| > To configure your Git client to sign tags by default for a local repository, in Git versions 2.23.0 and above, run `git config tag.gpgsign true`. To sign all tags by default in any local repository on your computer, run `git config --global tag.gpgsign true`. | |
| > To configure your Git client to sign tags by default for a local repository, in Git versions 2.0.0 and above, run `git config tag.gpgsign true`. To sign all tags by default in any local repository on your computer, run `git config --global tag.gpgsign true`. |
There was a problem hiding this comment.
This is a mistake.
Git version 2.23.0 is the one that added tag.gpgSign as a configuration variable. Sources:
git's release notes for version2.23.0mentions the addition oftag.gpgSign- Official docs for version
2.23.0mentiontag.gpgSignfor the first time. Not mentioned in any previous revision (for example,2.21.0, where it is not mentioned)
|
@ara303 We're going to ignore Copilot since it doesn't understand with "parity" means in this context, and I have no idea why the check is failing when you didn't touch the titles or filenames. I'll see if it resolves in the next few hours and take it to the engineers if not. Edit: Figured out the problem! Just need to get someone to fix it. 😅 It's not you, though, it's from another PR that updated something yesterday. |
|
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues ⚡ |
Why:
Closes: #43662
What's being changed (if available, include any code snippets, screenshots, or gifs):
Please see the issue mentioned above for a more detailed explanation, but in short this brings the docs for Signing tags to parity with the docs for Signing commits.
Previously the former lacked a "Tip" calling out that
git config --global tag.gpgsign trueis available, and is advantageous in that it allows the user to have automatic signing of tags (in other words, no need to pass the-Sflag when tagging).This is a low impact change, really just a "nice-to-have", to surface the option of automatic tag signing.
Check off the following: