我从命令行创建文件后它在哪里revoke.asc
?我查看了我的主目录的根目录:C:\Users\Me
但找不到它。我搜索过了*.asc
——没有运气。如果我gpg --armor --output revoke.asc --gen-revoke [your key ID]
第二次运行——它会报告revoke.asc
文件已经存在,我要覆盖它吗?——所以,它在那里。在某个地方……但是,在哪里!?这是我在提示符中看到的内容cmd
:
C:\Program Files (x86)\GNU\GnuPG\pub>gpg --armor --output revoke.asc --gen-revoke 7993DE75
sec 2048R/7993DE75 2015-12-31 John Doe (ABC123) <[email protected]>
Create a revocation certificate for this key? (y/N) y
Please select the reason for the revocation:
0 = No reason specified
1 = Key has been compromised
2 = Key is superseded
3 = Key is no longer used
Q = Cancel
(Probably you want to select 1 here)
Your decision? 0
Enter an optional description; end it with an empty line:
>
Reason for revocation: No reason specified
(No description given)
Is this okay? (y/N) y
You need a passphrase to unlock the secret key for
user: "John Doe (ABC123) <[email protected]>"
2048-bit RSA key, ID 7993DE75, created 2015-12-31
File `revoke.asc' exists. Overwrite? (y/N) y
Revocation certificate created.
Please move it to a medium which you can hide away; if Mallory gets
access to this certificate he can use it to make your key unusable.
It is smart to print this certificate and store it away, just in case
your media become unreadable. But have some caution: The print system of
your machine might store the data and make it available to others!
C:\Program Files (x86)\GNU\GnuPG\pub>
我正在运行 Windows 10 Home。
答案1
当使用--output
不带绝对路径的 时,路径从当前工作目录开始(就像您所做的那样,只提供文件名),文件应该存储在工作目录中。如果没有--output
,撤销证书将被打印到命令行。
现在您不能写入该C:\Program Files (x86)\GNU\GnuPG\pub
文件夹,默认情况下甚至没有写入权限。因此(并保持与允许写入的旧版 Windows 的兼容性),文件访问被重定向到主目录中隐藏文件夹中的覆盖目录AppData\Local\VirtualStore\Program Files (x86)\GNU\GnuPG\pub
。
转到您具有写权限的某个文件夹,或者提供允许您写入的某个文件夹的路径。