1
0
mirror of synced 2025-12-19 18:10:59 -05:00

no need of escaping inside single quotes (#27175)

Co-authored-by: Courtney Wilson <77312589+cmwilson21@users.noreply.github.com>
This commit is contained in:
Srinivas Devaki
2023-08-09 18:44:42 +05:30
committed by GitHub
parent 496bc1386e
commit 1ff4e315ae

View File

@@ -40,15 +40,15 @@ If you have multiple GPG keys, you need to tell Git which one to use.
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 -e '\nexport GPG_TTY=\$(tty)' >> ~/.zshrc; \
else echo -e '\nexport GPG_TTY=\$(tty)' >> ~/.zprofile; fi
$ if [ -r ~/.zshrc ]; then echo -e '\nexport GPG_TTY=$(tty)' >> ~/.zshrc; \
else echo -e '\nexport GPG_TTY=$(tty)' >> ~/.zprofile; fi
```
Alternatively, if you use the `bash` shell, run this command:
```shell
$ if [ -r ~/.bash_profile ]; then echo -e '\nexport GPG_TTY=\$(tty)' >> ~/.bash_profile; \
else echo -e '\nexport GPG_TTY=\$(tty)' >> ~/.profile; fi
$ if [ -r ~/.bash_profile ]; then echo -e '\nexport GPG_TTY=$(tty)' >> ~/.bash_profile; \
else echo -e '\nexport GPG_TTY=$(tty)' >> ~/.profile; fi
```
1. Optionally, to prompt you to enter a PIN or passphrase when required, install `pinentry-mac`. For example, using [Homebrew](https://brew.sh/):
@@ -103,7 +103,7 @@ If you have multiple GPG keys, you need to tell Git which one to use.
1. To add your GPG key to your `.bashrc` startup file, run the following command:
```bash
[ -f ~/.bashrc ] && echo -e '\nexport GPG_TTY=\$(tty)' >> ~/.bashrc
[ -f ~/.bashrc ] && echo -e '\nexport GPG_TTY=$(tty)' >> ~/.bashrc
```
{% endlinux %}