refactor: move the command needed to a 'note' ('info') admonition box
This commit is contained in:
parent
b7f25f1431
commit
bf5fe32d6a
|
@ -80,13 +80,24 @@ 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:
|
||||
{% admonition "note" %}
|
||||
|
||||
Just in case you have a similar error to the one below when signing a commit.
|
||||
|
||||
```shell
|
||||
error: gpg failed to sign the data
|
||||
fatal: failed to write commit object
|
||||
```
|
||||
|
||||
Then you need to execute the following command in order to add the `GPG_TTY` variable to your `~/bashrc` file.
|
||||
|
||||
```shell
|
||||
[ -f ~/.bashrc ] && echo -e '\nexport GPG_TTY=$(tty)' >> ~/.bashrc
|
||||
```
|
||||
|
||||
After that, reboot your system and you will be able to sign your commits.
|
||||
After that, log out your session (there's no need to reboot) and you will be able to sign your commits.
|
||||
|
||||
{% endadmonition %}
|
||||
|
||||
---
|
||||
> **Attribution**
|
||||
|
|
Loading…
Reference in a new issue