gpg使用pass密码管理器出现问题

gpg使用pass密码管理器出现问题

我想使用“pass”密码管理器。我似乎无法获得识别我的公钥的通行证。

$ gpg2 --list-keys

/home/johndoe/.gnupg/pubring.gpg
-------------------------------

pub   rsa4096/3AD31D0B 2011-02-08 [SCE]
uid         [ unknown] Fedora-SPARC (15) <[email protected]>
sub   elg4096/A9DAE699 2011-02-08 [E]

...许多其他键,例如上面的键,然后...

pub   rsa2048/27FA9292 2016-03-31 [SC]
uid         [ultimate] John Doe <[email protected]>
sub   rsa2048/7C8FD1D9 2016-03-31 [E]

$ pass git init 27FA9292
Reinitialized existing Git repository in /home/johndoe/.password-store/.git/

pass insert pubs/checkbook
Enter password for pubs/checkbook: 
Retype password for pubs/checkbook: 
gpg: captain Password Storage Key: skipped: No public key
gpg: [stdin]: encryption failed: No public key
fatal: pathspec '/home/johndoe/.password-store/pubs/checkbook.gpg' did not match any files

Captain 是主机名。为什么无法通过找不到我的公钥?

谢谢。

答案1

您无法将这两个命令压缩为一个。您需要首先使用密钥初始化通行证存储,然后,分别地,初始化git存储库。因为,正如手册所述,pass git只需要git-command-args.

因此,正确的方法需要两个步骤:

pass init YOUR_KEY
pass git init

相关内容