From dd33f83446cdc0b8a7450311e44fc560d0f7a050 Mon Sep 17 00:00:00 2001 From: Zuer Date: Thu, 20 Oct 2022 10:14:18 +0800 Subject: [PATCH 1/4] Add GPG auto-sign. --- .../telling-git-about-your-signing-key.md | 3 +++ data/reusables/gpg/set-auto-sign.md | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 data/reusables/gpg/set-auto-sign.md diff --git a/content/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key.md b/content/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key.md index 504536da90..0ddfcd5c89 100644 --- a/content/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key.md +++ b/content/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key.md @@ -35,6 +35,7 @@ If you have multiple GPG keys, you need to tell Git which one to use. {% data reusables.gpg.list-keys-with-note %} {% data reusables.gpg.copy-gpg-key-id %} {% data reusables.gpg.paste-gpg-key-id %} +{% data reusables.gpg.set-auto-sign %} 1. If you aren't using the GPG suite, run the following command in the `zsh` shell to add the GPG key to your `.zshrc` file, if it exists, or your `.zprofile` file: ```shell $ if [ -r ~/.zshrc ]; then echo 'export GPG_TTY=$(tty)' >> ~/.zshrc; \ @@ -73,6 +74,7 @@ If you have multiple GPG keys, you need to tell Git which one to use. {% data reusables.gpg.list-keys-with-note %} {% data reusables.gpg.copy-gpg-key-id %} {% data reusables.gpg.paste-gpg-key-id %} +{% data reusables.gpg.set-auto-sign %} {% endwindows %} @@ -95,6 +97,7 @@ If you have multiple GPG keys, you need to tell Git which one to use. {% data reusables.gpg.list-keys-with-note %} {% data reusables.gpg.copy-gpg-key-id %} {% data reusables.gpg.paste-gpg-key-id %} +{% data reusables.gpg.set-auto-sign %} 1. To add your GPG key to your `.bashrc` startup file, run the following command: ```bash $ [ -f ~/.bashrc ] && echo 'export GPG_TTY=$(tty)' >> ~/.bashrc diff --git a/data/reusables/gpg/set-auto-sign.md b/data/reusables/gpg/set-auto-sign.md new file mode 100644 index 0000000000..6b88d8bce2 --- /dev/null +++ b/data/reusables/gpg/set-auto-sign.md @@ -0,0 +1,4 @@ +1. To set automative GPG signing in Git, paste the text below: + ```shell + $ git config --global commit.gpgSign true + ``` From 3e1c5a7a9a84a9c32dfeb537e1f924ff4c1a7e89 Mon Sep 17 00:00:00 2001 From: Zuer Date: Thu, 20 Oct 2022 10:26:40 +0800 Subject: [PATCH 2/4] fix typo. --- data/reusables/gpg/set-auto-sign.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/reusables/gpg/set-auto-sign.md b/data/reusables/gpg/set-auto-sign.md index 6b88d8bce2..a59cca4a9f 100644 --- a/data/reusables/gpg/set-auto-sign.md +++ b/data/reusables/gpg/set-auto-sign.md @@ -1,4 +1,4 @@ -1. To set automative GPG signing in Git, paste the text below: +1. To set automatic GPG signing in Git, paste the text below: ```shell $ git config --global commit.gpgSign true ``` From 5d4263627e521f5432c28f2f8f858906168a37dc Mon Sep 17 00:00:00 2001 From: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com> Date: Fri, 21 Oct 2022 17:12:41 +0100 Subject: [PATCH 3/4] Update data/reusables/gpg/set-auto-sign.md --- data/reusables/gpg/set-auto-sign.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/data/reusables/gpg/set-auto-sign.md b/data/reusables/gpg/set-auto-sign.md index a59cca4a9f..8bfffd1d22 100644 --- a/data/reusables/gpg/set-auto-sign.md +++ b/data/reusables/gpg/set-auto-sign.md @@ -1,4 +1,7 @@ -1. To set automatic GPG signing in Git, paste the text below: - ```shell +1. Optionally, to configure Git to sign all commits by default, enter the following command: + + ```Shell $ git config --global commit.gpgSign true ``` + + For more information, see "[Signing commits](/authentication/managing-commit-signature-verification/signing-commits)." From ef9bef6187fc0b253a74a2212f3f862beb32f43a Mon Sep 17 00:00:00 2001 From: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com> Date: Fri, 21 Oct 2022 17:24:59 +0100 Subject: [PATCH 4/4] Update set-auto-sign.md --- data/reusables/gpg/set-auto-sign.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/reusables/gpg/set-auto-sign.md b/data/reusables/gpg/set-auto-sign.md index 8bfffd1d22..f4e57877d0 100644 --- a/data/reusables/gpg/set-auto-sign.md +++ b/data/reusables/gpg/set-auto-sign.md @@ -1,7 +1,7 @@ 1. Optionally, to configure Git to sign all commits by default, enter the following command: ```Shell - $ git config --global commit.gpgSign true + $ git config --global commit.gpgsign true ``` For more information, see "[Signing commits](/authentication/managing-commit-signature-verification/signing-commits)."