Got exactly same error and solved with Cygwin/Linux.
Output from Windows not working,
but output from Linux working.
I tried EOL conversion, didn’t help.
So I installed in Windows cygwin, then imported the windows gpg into cygwin gpg.
In my case the output from cygwin has been accepted.
Might be the recent gpg version doesn’t work? (I createed the private keys with default settings)
Versions used:
gitea 1.20.6
Windows gpg Version: gpg (GnuPG) 2.4.3 (Failed)
Cygwin gpg version: gpg (GnuPG) 1.4.23 (Works)
Linux GPG Version: gpg (GnuPG) 2.2.19 (Works)