Code Monkey home page Code Monkey logo

pinentry-touchid's Introduction

Pinentry-TouchID

Custom GPG pinentry program for macOS that allows using Touch ID for retrieving the key passphrase from the macOS keychain. (MacBook Pro with TouchID only)

Installation

Prerequisites

Install both using Homebrew:

$ brew install gnupg pinentry-mac

Pre-build Binaries

Download pre-build pinentry-touchid binaries from the GitHub Releases page.

$ VERSION=$(curl -fsSL https://api.github.com/repos/felix-kaestner/pinentry-touchid/releases/latest | jq -r .tag_name)
$ curl -fsSL -o pinentry-touchid "https://github.com/felix-kaestner/pinentry-touchid/releases/download/${VERSION}/pinentry-touchid-${VERSION}-$(uname -s)-$(uname -m)"
$ mv pinentry-touchid /usr/local/bin/pinentry-touchid

Manual

Clone the repository:

$ git clone https://github.com/felix-kaestner/pinentry-touchid.git

Build the binary using:

$ ./build.sh

Quickstart

List the keygrip of the GPG Key for which you want to store the passphrase:

$ gpg --list-keys --with-keygrip

/Users/user/.gnupg/pubring.kbx
----------------------------------------
pub   rsa4096 2022-04-01 [SC]
      < ... >
      Keygrip = 78066B99A804208F8DDB3C8F388C56C1C74EA812
uid           [ultimate] Felix Kästner <[email protected]>

Create a new entry in the MacOS Keychain for storing your passphrase:

Go to Keychain Access > Select the login keychain under Default Keychains > Click on Create new Keychain item. in the upper right (via the pencil icon). Fill in the prompt with the following information:

  • Keychain Item Name: "GnuPG"
  • Account Name: GPG Keygrip
  • Password: Your Passphrase

Finally, click on Add.

Configure the gpg-agent to use pinentry-touchid as its pinentry program. Add or replace the following line to your gpg agent configuration in: ~/.gnupg/gpg-agent.conf:

$ pinentry-program /usr/local/bin/pinentry-touchid

Pinentry-TouchID is now fully configured!

When used for the first time, MacOS will prompt you to allow access to the keychain. Simply provide access by using your user password and clicking Always Allow, so you won't be asked on every use.

pinentry-touchid's People

Contributors

felix-kaestner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

macmisu

pinentry-touchid's Issues

Update README

Please update the README instructions for newer Keychain versions.

There are now the following input fields:

  • Name: "GnuPG"
  • Kind: "application password"
  • Account: <Keygrip>
  • Where: "GnuPG"
  • Comments: (empty)
  • Password: <Password>

However, it seems it's now looking for a completely different entry in Keychain because using pinentry-mac directly works fine for me (finds above entry), using pinentry-touchid doesn't for some reason.

P.S.: You might also want to distinguish your project from the other pinentry-touchid.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.