1
0
mirror of synced 2026-01-06 06:02:35 -05:00

Merge pull request #21497 from sih4sing5hong5/gpg-auto-sign

Add GPG auto-sign commands
This commit is contained in:
Courtney Wilson
2022-10-21 13:52:40 -05:00
committed by GitHub
2 changed files with 10 additions and 0 deletions

View File

@@ -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

View File

@@ -0,0 +1,7 @@
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)."