Under Debian 8 I created (presumably, then with gpg 1 or 2.0) and published my key secring.gpg to a keyserver, the file is still under the directory ~/.gnupg/. But now with gpg 2.1:
has no output and attempts to sign something
gpg -s tmp.txt
gpg: no default secret key: secret key not available gpg: signing failed: secret key not available
Did I botch somehow the upgrade from Debian 8 to 9? Should I have exported the secret key before upgrading and how can I import the "old" secret key into the "new" gpg?
The problem is simply that - somehow, sometime - my secring.gpg shrank to the size 0! :-/ Discovered it with the solution from Stephen Kitt, when trying to import
gpg --import-secret-keys secring.gpg
I got a message that my file contains no valid data.