Keybase 使用

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

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




# keybase help
   keybase - Keybase command line client.

   keybase [global options] command [command options] [arguments...]


   account		Modify your account
   blocks		Manage user and team blocks
   bot			Manage bot accounts
   chat			Chat securely with keybase users
   ctl			Control the background keybase service
   currency		Manage cryptocurrency addresses
   decrypt		Decrypt messages or files for keybase users
   deprovision		Revoke the current device, log out, and delete local state.
   device		Manage your devices
   encrypt		Encrypt messages or files for keybase users and teams
   follow, track	Verify a user's authenticity and optionally follow them
   fs			Perform filesystem operations
   git			Manage git repos
   id			Identify a user and check their signature chain
   list-followers	List those who follow you
   list-following	List who you or the given user is publicly following
   log			Manage keybase logs
   login		Establish a session with the keybase server
   logout		Logout and remove session information
   oneshot		Establish a oneshot device, as in logging into keybase from a disposable docker
   paperkey		Generate paper keys for recovering your account
   passphrase		Change or recover your keybase passphrase
   pgp			Manage keybase PGP keys
   ping			Ping the keybase API server
   prove		Generate a new proof
   rekey		Rekey status and actions
   selfprovision	Provision a new device if the current device is a clone.
   sign			Sign a document
   signup		Signup for a new account
   sigs			Manage signatures
   status		Show information about current user
   team			Manage teams
   unfollow, untrack	Unfollow a user
   update		The updater
   verify		Verify message or file signatures for keybase users
   version		Print out version and build information
   wallet		Send and receive Stellar XLM
   whoami		Output the name of the current user; will exit with a non-zero status if none
   service		start the Keybase service to power all other CLI options
   help, h		Shows a list of commands or help for one command

   advanced		Description of advanced global options
   gpg			Description of how keybase interacts with GPG
   keyring		Description of how keybase stores secret keys locally
   tor			Description of how keybase works with Tor

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:
Enter another email address (or <enter> when done):
Push an encrypted copy of your new secret key to the server? [Y/n] Y
When exporting to the GnuPG keychain, encrypt private keys with a passphrase? [Y/n] Y
▶ INFO PGP User ID: xiexianbin <> [primary]
▶ INFO Generating primary key (4096 bits)
▶ INFO Generating encryption subkey (4096 bits)
▶ INFO Generated new PGP key:
▶ INFO   user: xiexianbin <>
▶ INFO   4096-bit RSA key, ID 901487EA218AEB1A, created 2019-05-25
▶ INFO Exported new key to the local GPG keychain
➜  ~ gpg --list-keys
pub   rsa4096 2019-05-25 [SC] [有效至:2035-05-21]
uid           [ 未知 ] xiexianbin <>
sub   rsa4096 2019-05-25 [E] [有效至:2035-05-21]

➜  ~ gpg --list-secret-keys
sec   rsa4096 2019-05-25 [SC] [有效至:2035-05-21]
uid           [ 未知 ] xiexianbin <>
ssb   rsa4096 2019-05-25 [E] [有效至:2035-05-21]

➜  ~

获取 PGP Public key

curl | 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


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 服务没有保存私钥。


  1. 使用 GPG 签名 Git Commit
Home Archives Categories Tags Statistics
本文总阅读量 次 本站总访问量 次 本站总访客数