-
-
Notifications
You must be signed in to change notification settings - Fork 496
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
Adding recipient to substore with age+git backend fails at git stage #2526
Comments
I just ran into the same bug using gopass 1.15.12. |
I fail to reproduce with 1.15.12, I'm afraid. @jmpolom The instructions are good but I think I'm missing a few steps before 1. How to you initialize the root and sub stores? |
Hey! I started over and created a new reproducer. Here's what I did:
Obviously the secrets were never encrypted for the additional recipient. This can also be seen when looking at the age files in raw mode. Here's a debug log of the step that failed when we added the recipient.: gopass-reproducer-debug-log-add-github.log Please let me know if I should try something else! Thanks for your help and this great project! |
I'll try to reproduce this now that I've touched much of the code handling this in #2960 |
Thx for getting back to this @AnomalRoil ! Much appreciated! |
This seems to have been fixed on master, most likely thanks to my last PR. ~/c/gopass ❯❯❯ gopass ls
__ _ _ _ _ _ ___ ___
/'_ '\ /'_'\ ( '_'\ /'_' )/',__)/',__)
( (_) |( (_) )| (_) )( (_| |\__, \\__, \
'\__ |'\___/'| ,__/''\__,_)(____/(____/
( )_) | | |
\___/' (_)
🌟 Welcome to gopass!
⚠ No existing configuration found.
☝ Please run 'gopass setup'
Error: not initialized
~/c/gopass ❯❯❯ gopass setup --crypto age
__ _ _ _ _ _ ___ ___
/'_ '\ /'_'\ ( '_'\ /'_' )/',__)/',__)
( (_) |( (_) )| (_) )( (_| |\__, \\__, \
'\__ |'\___/'| ,__/''\__,_)(____/(____/
( )_) | | |
\___/' (_)
🌟 Welcome to gopass!
🌟 Initializing a new password store ...
🔐 No useable cryptographic keys. Generating new key pair
🧪 Creating cryptographic key pair (age) ...
⚠ Do you want to enter a passphrase? (otherwise we generate one for you) [y/N/q]:
✅ Key pair for age generated
Passphrase: spoiling spinal prolonged cesarean
⚠ You need to remember this very well!
⚠ 🔐 We need to unlock your newly created private key now! Please enter the passphrase you just generated.
✅ Key pair age1f602pk6rmu9gkkm473nhea02zvenufq6rzvuaw477tssq5xrksnsq3gl2k validated
🔐 Cryptographic keys generated
🌟 Configuring your password store ...
Please enter an email address for password store git config []:
❓ Do you want to add a git remote? [y/N/q]: N
✅ Configuration written
~/c/gopass ❯❯❯ gopass mounts
🚥 Syncing with all remotes ...
[<root>]
gitfs pull and push ... Skipped (no remote)
✅ All done
No mounts
~/c/gopass ❯❯❯ gopass config
core.autopush = true
core.autosync = true
core.cliptimeout = 45
core.exportkeys = true
core.notifications = true
mounts.path = /tmp/gopasstest11/.local/share/gopass/stores/root
pwgen.xkcd-lang = en
recipients.hash = af6f9e4ad5811a1a0dace648fe1ed8d43996509936592b493a1d6b0ee102f8ac
~/c/gopass ❯❯❯ gopass generate test 10
✅ Password for entry "test" generated
Not printing secrets by default. Use 'gopass show test' to display the password.
~/c/gopass ❯❯❯ gopass clone --crypto age git@github.com:poikilotherm/reproducer-gopass.git reproducer
__ _ _ _ _ _ ___ ___
/'_ '\ /'_'\ ( '_'\ /'_' )/',__)/',__)
( (_) |( (_) )| (_) )( (_| |\__, \\__, \
'\__ |'\___/'| ,__/''\__,_)(____/(____/
( )_) | | |
\___/' (_)
🌟 Welcome to gopass!
🌟 Cloning an existing password store from "git@github.com:poikilotherm/reproducer-gopass.git" ...
⚠ Cloning gitfs repository "git@github.com:poikilotherm/reproducer-gopass.git" to "/tmp/gopasstest11/.local/share/gopass/stores/reproducer" ...
Git Email not set
⚠ Failed to commit .gitattributes to git
git configured at /tmp/gopasstest11/.local/share/gopass/stores/reproducer
Mounted password store /tmp/gopasstest11/.local/share/gopass/stores/reproducer at mount point `reproducer` ...
⚠ Configuring gitfs repository ...
🎩 Gathering information for the git repository ...
🚶 What is your name? [anomalroil]:
📧 What is your email? []:
Git Email not set
⚠ Failed to commit .gitattributes to git
Your password store is ready to use! Have a look around: `gopass list reproducer`
⚠ Please ask the owner of the password store to add one of your keys: age1f602pk6rmu9gkkm473nhea02zvenufq6rzvuaw477tssq5xrksnsq3gl2k
~/c/gopass ❯❯❯ gopass ls
gopass
├── reproducer (/tmp/gopasstest11/.local/share/gopass/stores/reproducer)
│ └── test/
│ ├── mysecret
│ └── mysecret2
└── test Feel free to re-open with reproduction instruction if this still doesn't work for you! |
Summary
Adding a recipient to an age encrypted gopass substore fails when gopass attemps to add re-encrypted files to git repo
Steps To Reproduce
gopass clone --crypto age https://git.repo.com/path/to/pass.git test-pass-sub
gopass ls
to verify that substore is mounted at test-pass-subgopass recipients
gopass recipients add --store test-pass-sub age1<...>
gopass git --store test-pass-sub status
and notice many changed files not staged for commit.To me it appears git is being called from the wrong directory or paths are being specified incorrectly. The issue can be manually corrected by adding the files with
git add
, committing and pushing however this should not be necessary.Expected behavior
Recipient can successfully be added without git error and manual recovery, as appears to be the case for the "root" store.
Environment
Linux hostname 6.1.6-100.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jan 14 17:00:40 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Additional context
None.
The text was updated successfully, but these errors were encountered: