尝试加密文件时,我在 KGpg 编辑器窗口中收到以下错误:
加密失败,错误代码 2
在命令行我得到:
$ gpg --list-keys
/home/user/.gnupg/pubring.gpg
---------------------------------
pub 2048D/5E04B919 2012-02-02 [expires: 2016-02-01]
uid Firstname Lastname <email.address@domain.com>
uid [jpeg image of size 4005]
$
$ gpg --encrypt file-to-encrypt
You did not specify a user ID. (you may use "-r")
Current recipients:
Enter the user ID. End with an empty line: email.address@domain.com
No such user ID.
这曾经在编辑器和命令行上使用相同的键工作。Current recipients:
是空的。这是为什么?
更新:
当尝试使用该-r
选项在命令行上指定用户 ID 时,我得到以下信息:
$ gpg -r email.address@domain.com --encrypt file-to-encrypt
gpg: email.address@domain.com: skipped: unusable public key
gpg: file-to-encrypt: encryption failed: unusable public key
信息:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.10
Release: 12.10
Codename: quantal
$ dpkg -s gnupg
Package: gnupg
Status: install ok installed
Priority: important
Section: utils
Installed-Size: 1936
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: foreign
Version: 1.4.11-3ubuntu4.4