You are not logged in.
I'm trying to encrypt a file with GnuPG to upload to a cloud server (Amazon is now offering free unlimited storage for 3 months and $60/year there after). I searched Google on the topic and came to https://serverfault.com/questions/48914 … es-in-unix. I followed the guide as well as the Arch Wiki article, however I get the error "gpg: file: encryption failed: No public key" when I try to encrypt anything.
$ gpg -encrypt --recipient 'name' -o file.gpg file
I then ran a search for this coming to: http://security.stackexchange.com/quest … rypt-fails
It is suggested to set the expiration period of the secret key to 0 as a fix, however this did not work for me.
$ gpg --edit-key $keyNumber1
Secret key is available.
pub rsa3072/$keyNumber1
created: 2015-03-31 expires: never usage: SC
trust: ultimate validity: ultimate
sub rsa3072/$keyNumber2
created: 2015-03-31 expires: never usage: E
[ultimate] (1). $name <$email>
my gpg.conf file
personal-digest-preferences SHA512
default-key $keynumber1
cert-digest-algo SHA512
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
personal-cipher-preferences TWOFISH CAMELLIA256 AES 3DES
no-greeting
default-recipient-self
keyserver hkp://keys.gnupg.net
[edit=solution] Appently I needed to set the recipient to be the key number as opposed to my name.
http://blog.sanctum.geek.nz/linux-crypto-gnupg-usage/
[edit2] According to Jason, you can also use the email address.
Last edited by nstgc (2015-04-01 01:25:15)
Offline
Who, or what, is 'name'?
Offline
That's my real name. I put $name in play of my name since I didn't want to post it online probably should have just used nstgc.
Thank you for the reply. I thought to check another tutorial, and it seems I needed to use the key number as the precipitant instead. http://blog.sanctum.geek.nz/linux-crypto-gnupg-usage/
This is solved.
Offline
Any email address associated with the key will work as well (and is easier to remember)...
Offline