You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command to add `GPG_TTY` does not update the shell config correctly if the file ends in a comment.
I previously installed pnpm so running the command changed my `.zshrc` file to:
```
#pnpm endexport GPG_TTY=$(tty)
```
Fixed by updating each instance of the command to:
```
echo -e '\nexport GPG_TTY=\$(tty)'
```
Copy file name to clipboardExpand all lines: content/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -39,13 +39,13 @@ If you have multiple GPG keys, you need to tell Git which one to use.
39
39
{% data reusables.gpg.set-auto-sign %}
40
40
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:
41
41
```shell
42
-
$ if [ -r~/.zshrc ];thenecho'export GPG_TTY=$(tty)'>>~/.zshrc; \
43
-
elseecho'export GPG_TTY=$(tty)'>>~/.zprofile;fi
42
+
$ if [ -r~/.zshrc ];thenecho-e '\nexport GPG_TTY=\$(tty)'>>~/.zshrc; \
0 commit comments