Keybase 使用

发布时间: 更新时间: 总字数:792 阅读时间:2m 作者:IP:上海 网址

Keybase 是一个基于 PGP 技术的社交网络平台,它可以将用户的身份映射到公钥,反之亦然。本文介绍 Keybase 命令行使用

介绍

安装

常用命令

keybase-help

keybase 生成 PGP Key

生成

➜  ~ keybase pgp gen --multi
Enter your real name, which will be publicly visible in your new key: xiexianbin
Enter a public email address for your key: me@xiexianbin.cn
Enter another email address (or <enter> when done):
Push an encrypted copy of your new secret key to the Keybase.io server? [Y/n] Y
When exporting to the GnuPG keychain, encrypt private keys with a passphrase? [Y/n] Y
▶ INFO PGP User ID: xiexianbin <me@xiexianbin.cn> [primary]
▶ INFO Generating primary key (4096 bits)
▶ INFO Generating encryption subkey (4096 bits)
▶ INFO Generated new PGP key:
▶ INFO   user: xiexianbin <me@xiexianbin.cn>
▶ INFO   4096-bit RSA key, ID 901487EA218AEB1A, created 2019-05-25
▶ INFO Exported new key to the local GPG keychain
➜  ~ gpg --list-keys
/Users/xiexianbin/.gnupg/pubring.kbx
------------------------------------
pub   rsa4096 2019-05-25 [SC] [有效至:2035-05-21]
      11518AF49EAA27D86EA01B5C901487EA218AEB1A
uid           [ 未知 ] xiexianbin <me@xiexianbin.cn>
sub   rsa4096 2019-05-25 [E] [有效至:2035-05-21]

➜  ~ gpg --list-secret-keys
/Users/xiexianbin/.gnupg/pubring.kbx
------------------------------------
sec   rsa4096 2019-05-25 [SC] [有效至:2035-05-21]
      11518AF49EAA27D86EA01B5C901487EA218AEB1A
uid           [ 未知 ] xiexianbin <me@xiexianbin.cn>
ssb   rsa4096 2019-05-25 [E] [有效至:2035-05-21]

➜  ~

获取 PGP Public key

curl https://keybase.io/xiexianbin/pgp_keys.asc | gpg --import
或
keybase pgp export -q 11518af49eaa27d86ea01b5c901487ea218aeb1a | gpg --import

导出公钥,并配置 git GPG key:

gpg --armor --export <pub GPG key ID>

获取 PGP Private key

keybase pgp export -q 11518af49eaa27d86ea01b5c901487ea218aeb1a --secret | gpg --allow-secret-key-import --import

上传 PGP Public Key

keybase pgp select # if you already have one in GPG
keybase pgp import # to pull from stdin or a file

FAQ

Linux Root run keybase

错误日志:

$ run_keybase
mkdir: cannot create directory ‘/run/user/0’: Permission denied

解决办法:

export KEYBASE_ALLOW_ROOT=1 run_keybase

导出 keybase security 错误

keybase pgp export -q <my-keybase-key-id> -s
▶ ERROR No matching keys found

keybase 服务没有保存私钥。

keybase 一直提示 Keybase helper update

本文总阅读量 次 本站总访问量 次 本站总访客数