feat: add shell command to add your GPG key to .bashrc, otherwise the signing process will not work

This commit is contained in:
jmarsal 2024-01-23 19:32:22 +01:00
parent 79d5804969
commit b7f25f1431
No known key found for this signature in database
GPG key ID: 83D4B8CDF16C00CA

View file

@ -80,6 +80,14 @@ You will need to tell Git about your key and have it sign new commits for you.
2. Type `git config --global user.signingkey <GPG KEY ID>`
3. Type `git config --global commit.gpgsign true`
Finally, to add your GPG key to your .bashrc startup file, run the following command:
```shell
[ -f ~/.bashrc ] && echo -e '\nexport GPG_TTY=$(tty)' >> ~/.bashrc
```
After that, reboot your system and you will be able to sign your commits.
---
> **Attribution**
> This guide is derived from [GitHub Docs](https://docs.github.com), used under CC-BY 4.0.