GnuPG Syntax Help

Hi all,

I'm trying to decrypt a GnuPG file but not having much luck. I'm new to using it and have tried 4 different ways to do it but nothing works. Here are examples of the attempts I have made:

gpg -o ./file_name.tar.Z --passphrase-fd 0 ./file_name.tar.Z.gpg 0<./password.txt
cat ./password.txt | gpg --passphrase-fd 0 --output ./file_name.tar.Z --decrypt ./file_name.tar.Z.gpg
cat ./password.txt|gpg --output ./file_name.tar.Z --batch --passphrase-fd 0 --decrypt ./file_name.tar.Z.gpg
echo [passphrase text]|gpg --output ./file_name.tar.Z --batch --passphrase-fd 0 --decrypt ./file_name.tar.Z.gpg

In every case this is the error message I recieve back:

gpg: encrypted with ELG-E key, ID
gpg: decryption failed: secret key not available

which I don't understand because the secret key has been given, either by the password.txt or via the echo statement, and I've been assured that the passphrase is correct so unless I'm being lied to I must be doing something wrong yes?

Thanks in advance for any help provided.

iirc, then you have to add the key to the keyring. The passphrase is like a password and a different thing than the key.

How do you add this "key"?

Use google, read man pages :wink:

Gnu Privacy Guard (GnuPG) Mini Howto (English): Using keys

It always seems peculiar to me when people come to forums that focus on helping to provide answers and solutions to problems only to be told to go look elsewhere.

No need to get cheeky - you got that far and I bet you will be able to check the documentation again for this very uncomplicated task.