Make gitea sign your commits

Workaround for this GitHub problem

Create gpg key

sudo -i -u gitea
cd data/home
cat .gitconfig

To get the default id and email for gitea

Generate keys for gitea with the username and email

When signing with sudo and ssh, remember to change the permission of current pts to the gitea user with sudo

gitea@host:~/data/home$ ls -l $(tty)
crw--w---- 1 otheruser tty 136, 53 Nov 21 16:19 /dev/pts/5
# In another term
chown gitea /dev/pts/5
gpg --homedir .gnupg --full-gen-key

Change the owner back afterwards

Change gpg key

Get key id with

gpg --homedir .gnupg --list-keys

And use the id in /etc/gitea/app.ini

[repository.signing]
DEFAULT_TRUST_MODEL = committer
SIGNING_KEY = 1**************************************D
SIGNING_NAME = Gitea
SIGNING_EMAIL = gitea@fake.local
MERGES = pubkey, commitssigned
CRUD_ACTIONS = pubkey, parentsigned

Restart gitea



Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

We can't live, work or learn in freedom unless the software we use is free.

Arguing that you don't care about the right to privacy because you have nothing to hide is no different from saying you don't care about free speech because you have nothing to say. – Edward Snowden