我想使用GnuPG加密一个文件
gpg2 --homedir=~/.gnupg --always-trust=true --recipient="BlahBlah" --encrypt=/path/to/file --output=/path/to/output_file
然而,这个命令似乎会永远停止运行而不返回结果。有趣的是,在我中断进程后,确实创建了
/path/to/output_file
,但写入那里的字节数比原始载荷要大得多(例如我的/path/to/file
只有5个字节,但事实证明写入/path/to/output_file
近200个字节)。一定有些错误,但我真的无法弄清楚出了什么问题。
我已经通过
gpg --import key.asc
提前导入了BlahBlah
的密钥。它在GnuPG 1和GnuPG 2中都发生了。