Error Gpg Key File Encryption Failed
Contents |
Pages: 1 #1 2015-03-31 21:48:39 nstgc Member Registered: 2014-03-17 Posts: 350 [Solved] GnuPG (gpg: file: encryption gpg encryption failed no public key failed: No public key) I'm trying to encrypt a
Gpg Encrypt Using Public Key File
file with GnuPG to upload to a cloud server (Amazon is now offering free
Gpg Encrypt File With Public Key Command Line
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
Gpg Encrypt File With Public Key Example
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 fileI then ran a search for this coming to: http://security.stackexchange.com/quest … rypt-failsIt is gpg file encryption mac 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 filepersonal-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 #2 2015-03-31 22:06:58 jasonwryan Forum & Wiki Admin From: .nz Registered: 2009-05-09 Posts: 19,478 Website Re: [Solved] GnuPG (gpg: file: encrypti
by: [ date ] [ thread ] [ subject ] [ author ] 123098 wrote: > > I've made a script that (among other things) encrypts gpg file encryption windows some sensitive data > that I have to send afterwards to a different gpg folder encryption user on a different computer. > If I encrypt the data by command-line I have no problem at all gpg disk encryption and > everything goes smoothly. However, when I try to get cron to run the script, > I get the error: > > gpg: [Recipient's_ID]: skipped: public key not found > gpg: https://bbs.archlinux.org/viewtopic.php?id=195498 [Filename]: encryption failed: public key not found > > I encrypt the data with the recipient's public key, that is included in my > keyring (I can see it if I list them), and that I signed with my own key. > The syntax that I use is: > > gpg --encrypt -r "[Recipient's_ID]" [Filename] > > I don't have a clue of https://lists.gnupg.org/pipermail/gnupg-users/2011-April/041499.html what the problem might be, since cron is running as > root and therefore has access to the key's location, and as I said before I > have no problem running the same script manually. Umm, no. Even though cron is running as root and has access to your keyring files, that's not the default location gpg running as root is going to look for keys. gpg running as root will look for keyring files in /root/.gnupg, or whatever is root's $HOME. Your command-line encryption looks in your .gnupg directory for the keyring files, ("~/.gnupg" if --homedir or $GNUPGHOME is not used). 1) Run gpg as root and import the needed public key(s); or 2) run the cron job as yourself; or 3) add --home-dir
= 17 When you are seeing an error message about a missing secret key, the cause can be: message author using the wrong public key When intentionally or by accident you (or a third https://gpgtools.tenderapp.com/kb/gpgservices-faq/message-not-decrypting-decryption-failed-no-secret-key-code-17 party) create more than one sec/pub key pair for your mail address, this can https://github.com/google/end-to-end/issues/326 lead to situations, in which the actual key being used by you, is not the public key your contacts may have downloaded from the key server. Should you want to clean up old keys, please refer to the KB how to revoke unused keys. secret key required for decryption no longer in your key-ring You may public key also indeed no longer be in possession of the secret key, needed to decrypt the message. The secret key could have been accidentally deleted. We've already had users report they bought a new computer and forgot to move their key-ring to the new machine. If you still have the old computer, transfer your keyring to your new machine. Verify the correct public key was used for encryption It is gpg encrypt file highly recommended, to exchange public keys with your contact (if you haven't already). Then verify and sign each others public keys as described in this KB-article. By doing that, you also ensure, that your contact is using the correct public key for encryption. Is this article helpful? Do you have any feedback about this article? (optional) Send feedback Sending your feedback Thank you! Section: GPGServices FAQ Last Updated: 31 Mar, 2016 09:01 AM How do I activate GPGServices? GPGServices installed but not showing up in services menu How to encrypt and sign text or files with GPGServices? How to decrypt and verify text or files with GPGServices? Message not decrypting, Decryption failed! (No secret key) Code = 17 Tutorials First steps - where do I start, where do I begin? (Setup GPGTools, Create a new key, Your first encrypted Mail) Watch Screencast Add more email addresses (User IDs) to your existing key Introduction to Cryptography How to verify the downloaded GPG Suite? View all (7 more) FAQ How to contribute How to best use this support forum? How can I generate debugging information? Password management Using GPG Suite, can I communicate with people on Windows and Linux? View all (9 more) GPGMail FAQ GPGMail no longer wo
Sign in Pricing Blog Support Search GitHub This repository Watch 278 Star 3,108 Fork 234 google/end-to-end Code Issues 19 Pull requests 1 Projects 0 Wiki Pulse Graphs New issue Exported private key fails to import to gpg 2.1.6 #326 Closed NoSubstitute opened this Issue Jul 18, 2015 · 9 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 2 participants NoSubstitute commented Jul 18, 2015 I created and exported a key with Google's End-to-End encryption module today and it definitely doesn't seem to play well with GPG 2.1.6. I know it can only create EC keys and apparently, it seems to create them without a uid. I've replaced all references to real keys and email addresses with X/Y/A or other similar nonsense. gpg --version gpg (GnuPG) 2.1.6 libgcrypt 1.6.3 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Home: C:/Users/xxxx/AppData/Roaming/gnupg Supported algorithms: Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2 gpg --import my-email@gmail.com-UNENCRYPTED-keyring-private.asc gpg: key XXXXXXXX: public key "my-email@gmail.com" imported gpg: key XXXXXXXX/XXXXXXXX: error sending to agent: End of file gpg: key XXXXXXXX/YYYYYYYY: error sending to agent: Input/output error gpg: key XXXXXXXX: "my-email@gmail.com" not changed gpg: Total number processed: 4 gpg: imported: 1 gpg: unchanged: 1 gpg: secret keys read: 3 gpg-agent crashes here. Still, the public key is imported. gpg -k pub