I'm trying for the first time to use gpg to encrypt a file with a symmetric key, but gpg doesn't seem to respond when I use the -c switch.

gpg -v -c filename

.. just doesn't seem to do anything, nor to report any error, and just hangs until I hit ctrl-c.

Any ideas?

link|improve this question

49% accept rate
feedback

3 Answers

If you have DISPLAY variable set it may be used to display prompt for password in a dialog window (it may have not appeared if you have DISPLAY set to some weird value). To verify that unset the variable:

unset DISPLAY

and try again.

link|improve this answer
feedback

It might be timing out checking for the gpg-agent. I have trouble with this for some commands, and you can run gpg with gpg --no-use-agent, and it will proceed.

link|improve this answer
feedback

Try adding sudo before the command

link|improve this answer
-1: It's never a good idea to just randomly put sudo in front of commands. – Wuffers Nov 22 '10 at 18:29
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.