Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix command to start gopass JSON API listener in gopass v1.12.0+ #29

Conversation

theuberuser
Copy link

@theuberuser theuberuser commented Jul 21, 2021

In gopass v1.12.0, the binaries for git-credential-gopass, gopass-hibp, gopass-jsonapi and
gopass-summon-provider were removed from gopass and migrated into their own git repos. When the gopass_wrapper.sh script is executed, it tries to run 'gopass jsonapi listen' which is no longer a recognized command in gopass v1.12.0+.

With the Gopass bridge Firefox extension installed, a window pops up when the user is prompted to log into a website:

An unexpected error occurred
Is your browser correctly set up for gopass? If you are upgrading to gopass v1.10 or newer you need to re-run the gopass-jsonapi setup command.

and the Firefox Browser Console shows this error:

Error: failed to retrieve secret "jsonapi": entry is not in the password store

The gopass command interprets "jsonapi" to be a secret and tries to lookup an entry for it which it does not find. The correct way to start the JSON API server is in newer versions of gopass is running gopass-jsonapi listen from within the cloned gopass-jsonapi git repository. I have tested this change using gopass v1.12.7 and gopass-jsonapi v1.11.1 and verified the Gopass bridge extension is able to read secrets from my gopass secret store.

Issues & PRs for reference:

@@ -10,6 +10,6 @@ fi
export PATH="$PATH:/usr/local/bin" # required on MacOS/brew
export GPG_TTY="$(tty)"

gopass jsonapi listen
./gopass-jsonapi listen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this will work everywhere. I'm not sure where this script is executed, but normally gopass-jsonapi should be installed in the $PATH.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this script get generated? When is this file even used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants