Changing the system avatar


Our unix user running gitea has a GPG key and git/gitea are configured to sign certain CRUD actions.
This works great, but… The commits have an avatar and we can’t figure out how to change it.

The avatar is coming from

Anyone know how to set the “system avatar”?
Or even how gitea is generating a gravatar lookup?


see Config Cheat Sheet - Docs


Thanks, but, unfortunately that doesn’t help.
Avatars work just fine, users can and do already upload their own.
The “user” that the system signs as isn’t an actual user though, so has no login or settings to change to upload an avatar with.

I’ve dug through the code a little, and more importantly the templates, and found things.


                                        {{if ne .Verification.SigningUser.ID 0}}
                                                <img class="ui avatar image" src="{{.Verification.SigningUser.RelAvatarLink}}" />
                                                <span title="{{.i18n.Tr "gpg.default_key"}}">{{svg "gitea-lock-cog"}}</span>
                                                <span class="ui text">{{.i18n.Tr "repo.commits.signed_by"}}:</span>
                                                <img class="ui avatar image" src="{{AvatarLink .Verification.SigningEmail}}" />
                                                <strong>{{.Verification.SigningUser.Name}} {{.Verification.SigningEmail}}</strong>
                                                <span class="pull-right"><span class="ui text">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> <i class="cogs icon" title="{{.i18n.Tr "gpg.default_key"}}"></i>{{.Verification.SigningKey.KeyID}}</span>

The SigningUser.ID is 0 because this isn’t a real user, so the avatar is always a hash of the email address in the GPG key, so always redirects to GRAVATAR_SOURCE i.e. gravatar in our case.

It took a long time digging through the code until I noticed the significant difference in the template!
AvatarLink generates an /avatar/hash link, whereas .Verification.SigningUser.RelAvatarLink contains /user/avatar/username/-1

We’ll upload the avatar we want to gravatar.