Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down Expand Up @@ -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 %}

Expand All @@ -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
Expand Down
7 changes: 7 additions & 0 deletions data/reusables/gpg/set-auto-sign.md
Original file line number Diff line number Diff line change
@@ -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)."