Skip to content

Instantly share code, notes, and snippets.

@adis-io
Last active January 31, 2023 18:20
Show Gist options
  • Save adis-io/2461eb058b7c3cfebfc3bbbdeda18da6 to your computer and use it in GitHub Desktop.
Save adis-io/2461eb058b7c3cfebfc3bbbdeda18da6 to your computer and use it in GitHub Desktop.
Gopass + Chrome + TouchID

Installation

  1. gopasspw/gopassbridge#22
  2. https://github.com/jorgelbg/pinentry-touchid
➜ cat ~/.gnupg/gpg-agent.conf
pinentry-program /opt/homebrew/bin/pinentry-touchid
➜ ✗ cat ~/.config/gopass/gopass_wrapper.sh
#!/bin/sh

export PATH="$PATH:$HOME/.nix-profile/bin" # required for Nix
export PATH="$PATH:/usr/local/bin" # required on MacOS/brew
export PATH="$PATH:/usr/local/MacGPG2/bin" # required on MacOS/GPGTools GPGSuite
export GPG_TTY="$(tty)"

# Uncomment to debug gopass-jsonapi
# export GOPASS_DEBUG_LOG=/tmp/gopass-jsonapi.log

if [ -f ~/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
	source ~/.gpg-agent-info
	export GPG_AGENT_INFO
else
	eval $(gpg-agent --daemon)
fi

export PATH="$PATH:/opt/homebrew/bin:/usr/local/bin"

/opt/homebrew/bin/gopass-jsonapi listen

exit $?

Troubleshooting

➜  gopass list --flat
➜  gpg-connect-agent reloadagent /bye
export GOPASS_DEBUG=true
➜  gopass websites/github.com/test
➜  wget https://raw.githubusercontent.com/gopasspw/gopassbridge/master/test-client/test-client.go
➜  go build test-client.go
echo '{"type":"query", "query": ""}' | ./test-client | gopass-jsonapi listen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment