Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update paste-gpg-key-id.md #33799

Merged
merged 4 commits into from
Jul 17, 2024
Merged

Conversation

dustinkirkland
Copy link
Contributor

The documentation in here definitively does not work -- adding a trailing exclamation mark on a subkey causes git signing to fail:

$ GIT_TRACE=1 git commit -S -a
14:39:24.442514 git.c:455               trace: built-in: git commit -S -a
hint: Waiting for your editor to close the file... 14:39:24.461555 run-command.c:668       trace: run_command: GIT_INDEX_FILE=foo/.git/COMMIT_EDITMSG
14:39:39.240473 run-command.c:668       trace: run_command: gpg --status-fd=2 -bsau 'AD962CEE23420C1C'\!''
error: gpg failed to sign the data
fatal: failed to write commit object

However, omitting the trailing "!" works perfectly....

$ git config --global user.signingkey "AD962CEE23420C1C"
$ GIT_TRACE=1 git commit -S -a
14:42:37.225614 git.c:455               trace: built-in: git commit -S -a
hint: Waiting for your editor to close the file... 14:42:37.242806 run-command.c:668       trace: run_command: GIT_INDEX_FILE=foo/.git/COMMIT_EDITMSG
14:42:48.298643 run-command.c:668       trace: run_command: gpg --status-fd=2 -bsau AD962CEE23420C1C
14:42:48.601145 run-command.c:668       trace: run_command: git maintenance run --auto --no-quiet
14:42:48.602894 git.c:455               trace: built-in: git maintenance run --auto --no-quiet
[Makefile c850bc3a] ensure that we have a packages directory before mounting it
 1 file changed, 1 insertion(+)

Remove the advice about a trailing '!'  This definitely does not work for me on Linux with gpg and git.  Leaving off the trailing '!' works perfectly however.
Copy link

welcome bot commented Jul 2, 2024

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Jul 2, 2024
Copy link
Contributor

github-actions bot commented Jul 2, 2024

Automatically generated comment ℹ️

This comment is automatically generated and will be overwritten every time changes are committed to this branch.

The table contains an overview of files in the content directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the data directory will not show up in this table.


Content directory changes

You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.

Source Preview Production What Changed
authentication/managing-commit-signature-verification/telling-git-about-your-signing-key.md fpt
ghec
ghes@ 3.13 3.12 3.11 3.10
fpt
ghec
ghes@ 3.13 3.12 3.11 3.10
from reusable

fpt: Free, Pro, Team
ghec: GitHub Enterprise Cloud
ghes: GitHub Enterprise Server

@nguyenalex836
Copy link
Contributor

@dustinkirkland Thanks so much for opening a PR! I'll get this triaged for review ✨

@nguyenalex836 nguyenalex836 added content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review authentication Content relating to authentication and removed triage Do not begin working on this issue until triaged by the team labels Jul 2, 2024
Copy link
Contributor

@felicitymay felicitymay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the official git documentation, it seems as if the ! suffix is not needed. See:

However, it seems as if there are times where ! (or escaped \!) is required to force using a specific key. See:

Consequently, I'm going to expand your change to add this as an option.

@felicitymay
Copy link
Contributor

I'm not sure why the preview's failing - I've tried re-running the workflow, which didn't make any difference 😞

I'm going to update this branch from main which will trigger the preview from scratch 🤞🏻

@felicitymay
Copy link
Contributor

@dustinkirkland - this has the change you suggested, but still allows people to discover the use of an !, should they need it.

Since you're based in the US and I'm in Europe, I'm going to leave this for you to take a look at the preview: Telling Git about your GPG key with the intention of merging it tomorrow unless you spot any errors or concerns.

@felicitymay felicitymay added this pull request to the merge queue Jul 17, 2024
Merged via the queue into github:main with commit f5007ee Jul 17, 2024
41 checks passed
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authentication Content relating to authentication content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review
3 participants