What alternative to GnuPG has a compatible interface (for use by Git) and does not leave behind an active lock (like pubring.db.lock) when something crashes?
You can sign git commits using SSH keys, including the one you use to connect to GitHub/GitLab/Codeberg. These sites also support verifying the signature.