#gpg #keybase #openpgp #pgp

app kbgpg

GnuPG-compatibility wrapper for Keybase

3 releases

Uses old Rust 2015

0.1.2 Aug 20, 2017
0.1.1 Mar 16, 2017
0.1.0 Mar 16, 2017

#2103 in Cryptography

GPL-2.0 license

18KB
371 lines

kbgpg - A GnuPG-compatible commandline wrapper for Keybase

Introduction

kbgpg is a small wrapper CLI for Keybase that emulates a subset of the GnuPG gpg commandline client. It's primary purpose is to allow signing and verification in programs that only support gpg without having to import and manage keys in your local GnuPG keyring. The main target is git, although other tools are possible (see below for specific usage with tools).

Installation

kbgpg is written in Rust and distributed on crates.io; if you already have a development environment setup just run cargo install kbgpg. If you don't have Rust setup but wish to install this way see rustup for the simplest method of getting Rust installed.

In addition to this there are some binaries distributed on Bitbucket; currently only Linux amd64 and OS X architectures are available. These are signed with my Keybase ID. To use these just download the appropriate binary, make it executable and put it somewhere on your path.

Usage

Git

Usage of kbgpg can be enabled globally or on a per-repository basis. The simplest method is to use git config:

git config --global gpg.program <path-to>/kbgpg

By default Git passes your name/email as the key identifies; Keybase doesn't understand this and it is ignored; if you only have one key that one will be used. If you wish to specify a key you can do so by giving git config the 70-digit key identifier from keybase pgp list:

git config --global user.signingkey 0123456789abcdef....

To sign a commit use git commit -S .... The signed commits will be verified with kbgpg/Keybase when you do git log --show-signatures.

Leiningen

Leiningen will sign both git tags and generated JARs while performing a release. To use Keybase to do this set the Git path to kbgpg:

export GIT_LEIN=<path-to>/kbgpg

You can override the default key ID in your project.clj or ~/.lein/profiles.clj; see the Leiningen GPG documentation for details.

Others

Theoretically kbgpg should work with any program that uses the gpg commandline and allows you to override the binary path. However gpg's commandline options have grown organically, and in practice there are several ways to specify the same thing (git and lein work very differently for example). Other tools may require further additions to the kbgpg/gpg compatability; use-cases/patches welcome.

License

Copyright © 2014 Steve Smith

Distributed under GPL v2; see LICENSE for details.

Dependencies

~7–13MB
~166K SLoC