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

docs: example for gopass mounts add command #2951

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jcrben
Copy link

@jcrben jcrben commented Sep 28, 2024

Putting the link to the docs here might not make as much sense as putting in the main command I guess. Let me know if you want me to pull them up. Of course you don't have to accept this, open to your feedback

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

@dominikschulz
Copy link
Member

Thank you. I agree the command is not as easy to use as I'd expect it to be.
I think we should try to make it more user friendly. Your change is a first step in that direction but I think we should also think about further ways to make this easy to use.

Accidentally mounting a tree inside the store (like in your pwd example) sounds like something we should be able to detect and prevent. And if there is only one argument given and it matches an existing path we might hint the user at the correct invocation.

@jcrben
Copy link
Author

jcrben commented Oct 2, 2024

@dominikschulz do you need me to fix the sign-off?

@AnomalRoil
Copy link
Member

@jcrben Yes please:

  • In your local branch, run: git rebase HEAD~1 --signoff
  • Force push your changes to overwrite the branch: git push --force-with-lease origin mounts-add-more-help

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