Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

2012Tony2012

macrumors 6502a
Original poster
Dec 2, 2012
741
3
I installed GPGTools on my iMac, and then tried to decrypt gpg files that I created on my other machine.

I am able to decrypt the gpg files on my Linux Mint machine and even on an MS Windows machine. But on the iMac, they won't decrypt.

I am trying to decrypt using Terminal: gpg -d filename.gpg

It seems to decrypt the files a bit, but terminates before writing the output file.

Any advice?
 
What option did you use to encrypt the files?

Code:
gpg -c file.txt
will perform symmetric encryption of file.txt and will ask for a passphrase. You only need to enter the passphrase to decrypt it.


Code:
gpg -e file.txt
will encrypt file.txt using a asymmetric/symmetric hybrid crypto scheme. It will ask you for a recipient ID and will then encrypt file.txt using the public key of the recipient you specify. You will need the private key available on your machine to decrypt it.

If you used the second option, you will have to bring the private key over to the other computer and import it.


edit: If it terminates before writing an output file, try this

Code:
gpg -d -o file.txt file.gpg

This will write the output of the decrypted file.gpg to file.txt rather than simply displaying it on the terminal.
 
Dumb question but did you import the private keys?

Sure did :) Secret key imported:)

Interestingly, I can even see some text inside some gpg files as it's decrypting in terminal screen, but the hear a beep sound and the decrypted gpg file is not finalised and written.

It's really weird.

Using gpg -d filename.gpg in terminal, what other way can I try?

BY the way, all the files I want to decrypt are ZIP files, e.g budgetexcellfiles.zip.gpg

Any help please?
 
Last edited:
What option did you use to encrypt the files?

Code:
gpg -c file.txt
will perform symmetric encryption of file.txt and will ask for a passphrase. You only need to enter the passphrase to decrypt it.


Code:
gpg -e file.txt
will encrypt file.txt using a asymmetric/symmetric hybrid crypto scheme. It will ask you for a recipient ID and will then encrypt file.txt using the public key of the recipient you specify. You will need the private key available on your machine to decrypt it.

If you used the second option, you will have to bring the private key over to the other computer and import it.


edit: If it terminates before writing an output file, try this

Code:
gpg -d -o file.txt file.gpg

This will write the output of the decrypted file.gpg to file.txt rather than simply displaying it on the terminal.

Thank you, that works great, I now use this command:

gpg -d -o file.zip file.gpg
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.