pacman -S gnupg # Arch Linux apt install gnupg # Debian 系 dnf in gnupg # RH 系 zypper in gnupg # 蜥蜴系
生成密钥
安装成功后,使用gen-ken参数生成自己的密钥
1
gpg --gen-key
会输出
1 2 3 4 5 6 7 8 9
gpg (GnuPG) 2.4.3; Copyright (C) 2023 g10 Code GmbH This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
注意:使用 “gpg --full-generate-key” 以获得一个全功能的密钥生成对话框。
GnuPG 需要构建用户标识以辨认您的密钥。
真实姓名:
这里需要按照问题填,填了回车,后按O确定
1 2 3 4 5 6 7 8 9 10 11 12 13 14
gpg (GnuPG) 2.4.3; Copyright (C) 2023 g10 Code GmbH This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
┌─────────────────────────────────────────────────────────────────────────────────────────┐ │ 警告:您输入了一个不安全的密码 │ │ │ │ A passphrase should be at least 8 characters long. │ │ │ │ <无论如何都使用这个> <输入新的密码> │ └─────────────────────────────────────────────────────────────────────────────────────────┘
gpg (GnuPG) 2.4.3; Copyright (C) 2023 g10 Code GmbH This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.