gopasspw / gopass

The slightly more awesome standard unix password manager for teams
https://www.gopass.pw/
MIT License
5.84k stars 487 forks source link

gopass mounts add should be easier to use #2952

Open dominikschulz opened 5 hours ago

dominikschulz commented 5 hours ago

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