gpg encryption failed no public key
Florian Schwind
f.schwind at chili-radiology.com
Fri Mar 12 09:37:49 CET 2010
Hi,
On 12.03.2010 07:11, nagaram.c wrote:
> Thanks for the response, the command
>
>> gpg --recepient testuserID --encrypt abc.txt
>
> I used has double dashes still I gives the same error.
>
> I think I am using the default keyring as I didn't change its location
try using the "--homedir <path_to_your_keyring>" option
> Thanks,
> Nag
Greetings
Florian
> -----Original Message-----
> From: gnupg-users-bounces at gnupg.org [mailto:gnupg-users-bounces at gnupg.org]
> On Behalf Of Grant Olson
> Sent: Thursday, March 11, 2010 12:24 PM
> To: gnupg-users at gnupg.org
> Subject: Re: gpg encryption failed no public key
>
> On 3/11/2010 7:52 AM, nagaram.c wrote:
>> Hi,
>>
>>
>>
>> I am new to gpg command line utility for file encryption/decryption. I
>> have installed gpg4win v 2.0.2& trying to encrypt a file with a key
>> that I imported which is also listing while typing list-keys command
>>
>>
>>
>> The issue is that I am getting encryption failed no public key while
>> typing in the below command
>>
>>> gpg -recipient testUserID -encrypt abc.txt
>>
>>
>>
>> In one of the posts I found that this is due to not specifying keyring
>> location with using -keyring option
>>
>>
>>
>> But while I used below command with specifying keyring as below
>>
>>
>>
>>> gpg -recipient testIUserID -keyring C:/Documents&
>> Settings/username/Application Data/gnupg/pubring.gpg -encrypt abc.txt
>>
>>
>>
>> I am getting below error
>>
>>
>>
>> gpg: keyblock resource 'C:/Documents& Settings/username/Application
>> Data/gnupg/C:/Documents' no such file or directory
>>
>> usage: gpg [options] [filename]
>>
>>
>
> The first command isn't working because you need to double-dash the
> options. "--recipient" and "--encrypt".
>
> You really shouldn't need the -keyring option if you're using your
> default keyring. But for the option to work, you would need quotes
> around the filename since it has spaces in it.
More information about the Gnupg-users
mailing list