Happend by accident. I started gpg2.1 in an environment where the agent running
still was from 2.0 so this was caused by a setup error.
gpg2 --sign foo
gpg: NOTE: THIS IS A DEVELOPMENT VERSION!
gpg: It is only intended for test purposes and should NOT be
gpg: used in a production environment or with production keys!
gpg: starting migration from earlier GnuPG versions
gpg: porting secret keys from '/home/aheinecke/.gnupg/secring.gpg' to gpg-agent
gpg: error getting the KEK: Unknown IPC command
gpg: error getting the KEK: Unknown IPC command
gpg: error getting the KEK: Unknown IPC command
gpg: error getting the KEK: Unknown IPC command
gpg: error getting the KEK: Unknown IPC command
gpg: error getting the KEK: Unknown IPC command
gpg: migration succeeded
gpg: no default secret key: No secret key
gpg: signing failed: No secret key
Nothing bad happened. The secret key is still there. But I thought to report it
even as it is a setup error as I think the error handling should be improved so
that it does not print "migration succeeded" in case it failed.
As we all know some weird things might be listening on the gpg-agent socket ;-)