# GPG for Git After Fresh Install

**URL:** <https://onlykey.discourse.group/t/gpg-for-git-after-fresh-install/1353>\
**Category:** SSH, OpenPGP, GPG\
**Created:** [September 26, 2024, 3:09am UTC](https://onlykey.discourse.group/t/gpg-for-git-after-fresh-install/1353 "2024-09-26T03:09:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@adam](https://onlykey.discourse.group/u/adam)\
**Post date:** [September 26, 2024, 3:09am UTC](https://onlykey.discourse.group/t/gpg-for-git-after-fresh-install/1353/1 "2024-09-26T03:09:11Z")

</div>

Hi,

I am looking for confirmation on the correct process to get my GPG signing working again after a fresh install. I have backed up my .gnupg folder but I am hoping that isn’t a requirement from a practicality point of view. I have completed the following;

1. Installed pip and the onlykey-agent

```auto
 pip install onlykey-agent

```

1. Set my git config

```auto
git config user.email adam@example.com
git config user.name adam
git config --global commit.gpgsign 1
git config --global gpg.program $(which gpg2)
git config --global user.signingkey D926965E63......

```

1. Started the GPG agent

```auto
 systemctl --user start gpg-agent

Looking at the .gnupg folder currently, there is no onlykey folder. I can restore my current backup of the onlykey folder and it works as expected but I assumed that everything I needed was satisfied by the agent and the onlykey. Appreciate if someone can clarify

Thanks

Adam
```
