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

gopass-jsonapi configure complains store uninitialized #104

Open
liljenstolpe opened this issue Apr 8, 2023 · 6 comments
Open

gopass-jsonapi configure complains store uninitialized #104

liljenstolpe opened this issue Apr 8, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@liljenstolpe
Copy link

liljenstolpe commented Apr 8, 2023

Summary

bridge has stopped working on my Arch box. When I attempt to run gopass-jsonapi configure I get the following error:

Failed to initialize gopass API: password store not initialized. run 'gopass setup' first

But gopass is fully configured and running

Steps To Reproduce

Not sure how I got here. So, not quite sure how to reproduce, sorry.

Expected behavior

Be able to re-run configure on a running gopass system and be able to bring up bridge or other jsonapi clients

But - maybe - have a new-style config file, and non-default store location?

Environment

Please complete the following information (see note below)

  • Arch, recent

  • OS version: Linux mjolnir 6.1.11-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 09 Feb 2023 20:06:08 +0000 x86_64 GNU/Linux

  • gopass-jsonapi Version: Bzzz - try again - won't even run that due to the error

  • Installation method: Original from AUR, retried with a go get.

Additional context

Re-ran with DEBUG set, here are some interesting tid-bits...

❯ cat /tmp/gp.log
2023/04/07 19:03:55.079858 pwrules/aliases.go:55	pwrules.loadCustomAliases	no custom aliases found at /home/cdl/.config/gopass/domain-aliases.json
2023/04/07 19:03:55.108839 config/io.go:47	config.loadConfig	Trying to load config from /home/cdl/.config/gopass/config.yml
2023/04/07 19:03:55.108863 config/io.go:47	config.loadConfig	Trying to load config from /home/cdl/.config/gopass/config.yml
2023/04/07 19:03:55.108871 config/io.go:47	config.loadConfig	Trying to load config from /home/cdl/.gopass.yml
2023/04/07 19:03:55.109291 config/io.go:66	config.loadDefault	Loaded default config: &config.Config{AutoClip:false, AutoImport:false, ClipTimeout:45, ExportKeys:true, NoPager:false, Notifications:true, Parsing:true, Path:"/home/cdl/.local/share/gopass/stores/root", SafeContent:false, Mounts:map[string]string{}, ConfigPath:"/home/cdl/.config/gopass/config.yml", XXX:map[string]interface {}(nil)}

The key here, is you aren't seeing the config.

The config is in /home/cdl/.config/gopass/config note it's in the NEW format (the gitconfig format), not the YAML format. It looks like you aren't looking for the non-yaml format configs. Therefore, you aren't finding my stores.

Note, I didn't change the config format, I assume some upgrade that gopass went through in the last year did the translation in a migration.

@liljenstolpe
Copy link
Author

@dominikschulz, any thoughts on this?

@liljenstolpe
Copy link
Author

Ok, I have an ugly hack workaround, that works for some reason.

$ gopass-jsonapi configure --print

Then, at the end, when it asks you to install, say 'Y'. Evidently, that somehow bypasses the check that is blocking the normal install/configure.

@liljenstolpe
Copy link
Author

Is there anyone paying attention here?

@dominikschulz dominikschulz added the bug Something isn't working label May 16, 2023
@liljenstolpe
Copy link
Author

@dominkschultz - need anything else from me?

@fetwar
Copy link

fetwar commented Nov 21, 2023

+1, although slightly different.

I am unable to able to install for all users, without initialising a password store for the root user, which is a bit annoying.

You could change /etc/opt/chrome/native-messaging-hosts directory to allow write from non root users, then switch it back after running the install script. Although the install locations for the wrapper etc would default to still being in your home directory.

@dominikschulz
Copy link
Member

I am unable to able to install for all users, without initialising a password store for the root user, which is a bit annoying.

This is something we should fix. An initialized password store should not be required to install the extension.

@dominikschulz dominikschulz self-assigned this Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants