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 mounts add should be easier to use #2952

Open
dominikschulz opened this issue Sep 30, 2024 · 3 comments
Open

gopass mounts add should be easier to use #2952

dominikschulz opened this issue Sep 30, 2024 · 3 comments
Assignees
Labels
good-first-issue Good for beginners starting to contribute Hacktoberfest ux User experience / User Interface related

Comments

@dominikschulz
Copy link
Member

Reported by @jcrben in #2951:

I've been feeling a bit dense using gopass to be honest, originally was trying to add an existing mount and it spits out this ugly message:

ben2204@lenovo-legion:~/dotfiles$ gopass mounts add $(pwd)/.password-store

Error: failed to add mount "/home/ben2204/dotfiles/.password-store" to "/home/ben2204/.local/share/gopass/stores/-home-ben2204-dotfiles-.password-store": failed to add mount: failed to init sub store "home/ben2204/dotfiles/.password-store" at "/home/ben2204/.local/share/gopass/stores/-home-ben2204-dotfiles-.password-store": password store home/ben2204/dotfiles/.password-store is not initialized. Try gopass init --store home/ben2204/dotfiles/.password-store --path /home/ben2204/.local/share/gopass/stores/-home-ben2204-dotfiles-.password-store

I then followed that up with this:

gopass mounts add -c $(pwd)/.password-store

which created this ugliness:

ben2204@lenovo-legion:~/dotfiles$ gopass ls
gopass
└── home/
    └── ben2204/
        └── dotfiles/
            └── .password-store (/home/ben2204/.local/share/gopass/stores/-home-ben2204-dotfiles-.password-store)

Finally figured it out after reading the fine manual (RTFM) 😄

ben2204@lenovo-legion:~/dotfiles$ gopass mounts add  secondary-store $(pwd)/.password-store
Mounted secondary-store as /home/ben2204/dotfiles/.password-store
ben2204@lenovo-legion:~/dotfiles$ gopass ls
gopass
├── asecret
└── secondary-store (/home/ben2204/dotfiles/.password-store)
    └── test1
@AnomalRoil AnomalRoil added ux User experience / User Interface related good-first-issue Good for beginners starting to contribute Hacktoberfest labels Oct 3, 2024
@Madraceee
Copy link

Hey, Can you provide me with more details on what i should solve
Comment gives me a general idea. But more details would be helpful.

@AnomalRoil
Copy link
Member

Hi @Madraceee , I guess at least:

  • if a single argument is provided without using -c and it's a path, ask the user using AskForBool whether they want to add that path as an alias for the last folder name in that path
  • output a out.Noticef that the mounts add command typically expect the sub-store "alias" as its first argument and then a path to that substore instead of outputing a long weird error chain as above.
  • on errors, also output the Usage of the command maybe, like we do on an empty set of arguments.

@Prerrna
Copy link

Prerrna commented Oct 15, 2024

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Good for beginners starting to contribute Hacktoberfest ux User experience / User Interface related
Projects
None yet
Development

No branches or pull requests

4 participants