No secret key

Eva Bolten Eva.Bolten at gnupg.com
Mon Mar 4 16:12:50 CET 2024


Hi,

First of all: The usual procedure when asking for advice is to tell us which 
gpg version you are using. And on which operation system. 
But it seems likely that in this case the info is not necessary. 

> I received this message when using --clear-sign.
> gpg: no default secret key: No secret key
> gpg: clear-sign dialed: No secret key

Please always post complete gpg comand lines and the corresponding output - 
you can of course obfuscate names and other personal info.

I assume you have entered something like:

	gpg --clear-sign test.txt 

without specifiying the key to use on the command line and no default key 
defined in you gpg.conf.

The gpg man page describes how to specify that key:

--clearsign
              Make  a cleartext signature.  The content in a cleartext sig‐
              nature is readable  without  any  special  software.  OpenPGP
              software  is  only needed to verify the signature.  cleartext
              signatures may modify end-of-line whitespace for platform in‐
              dependence  and are not intended to be reversible.  The sign‐
              ing key is chosen by default or can be set  explicitly  using
              the --local-user and --default-key options

Therefore, If you did not set a default key in your gpg.conf, you have to 
provide the key to use on the command line as described.
 
Regards

Eva








More information about the Gnupg-users mailing list