Comments (10)
This should work. I regularly use that feature. Let me try to reproduce.
from gopass.
I can't reproduce on my side on neither v1.15.5
nor on master
:
$ gopass show test
Secret: test
this is a test
on two line
test
otpauth: otpauth://totp/Example:[email protected]?secret=JBSWY3DPEHPK3PXP&issuer=Example
$ gopass show --password test
this is a test
How did you install gopass
?
Which version do you have?
gopass -v
from gopass.
Thanks @AnomalRoil and @dominikschulz for the prompt reply.
gopass 1.15.5 go1.20.3 linux amd64
using Arch GNU/Linux
I installed using pacman/paru
This is the format I have the results when I do a gopass show "name"
Secret: name_of_secret
Name: name.of.entry
Username: here_username
Password: here_password
URL: https://here.url
I am starting to suspect the issue is that gopass gets the first line and not the line with Password on it? And such is why I got the Name key: as a password?
I have around 300 records, if this is the case, is there a way to fix this on all?
I imported all those from Bitwarden, 3–4 months a go, and until now, I was just doing show without the --password option but I do need it now to run another tool.
[edit] I think I used this one to import the data https://github.com/shassard/bitwarden2pass/blob/master/bitwarden2pass.py and it did a good job until now that I notice with your example that my entries are a bit different
from gopass.
Ah, does gopass show name_of_secret password
using our KV feature work?
I think to recall we might have had once upon a time a special case for --password
pulling from key-values maybe. I'll need to check.
But yeah, worth asking what that flag is supposed to do when you have parsing enabled I guess.
from gopass.
hmm interesting with the argument at the end does work, unfortunately most apps ask to be pass compatible and I though gopass was 100% compatible with pass? If I do like in pass a gopass -c name it also gets Name key instead of Password same with the original command I wrote in my first comment. So I think is trying to get the first entries "Name:" as the password so I may need to change the format, is there a way to mass edit or a command to move this around I can write a loop and do it with a bash script
from gopass.
ok, so I confirmed I got a ramdon entry and edited with gopass edit name_of_key I copy the Password: key entry and have paste it on top of all the rest of keys as is, and now when I do gopass -c name_of_key it gets the password.
now this entry is like:
Secret: name_of_secret
here_plain_password_with_no_key
Name: name.of.entry
Username: here_username
Password: here_password
URL: https://here.url
from gopass.
pass
did always put the password on the first line of the secret. That's what gopass does at well.
And the import script you linked seems to handle that correctly as well.
Not sure what went wrong. We might want to fall back checking for a password
key if the first line is empty. But if it's not empty there is no way for us to tell if the first line is supposed to be the password or not.
from gopass.
You could use the following, I guess:
for entry in $(gopass ls --flat); do
data=$(gopass show -n -f $entry)
password=$(echo $data | grep Password | sed -r 's/Password: //g')
if [ -z "$password" ]
then
continue
fi
echo -n "$password\n---\n$(echo $data | sed -r 's/Password: .*?//g' | awk NF)" | gopass insert -f $entry
done
It would go through all entries and if there is a match for the Password: pwd
line it would insert it on the first line and add a yaml --- separator to it.
e.g. entries would look like
here_password
---
Name: name.of.entry
Username: here_username
URL: https://here.url
afterwards
from gopass.
@AnomalRoil Thanks for the reply! sorry I was out traveling for work. will review your response thanks for the solution.
from gopass.
Closing this, feel free to re-open / comment in case you need more help solving the issue. But it looks like the cause is bitwarden2pass
not conforming with the expected pass output for secrets (e.g. secret on the first line).
from gopass.
Related Issues (20)
- `--stores` option incorrectly parsed HOT 10
- `core.notifications = false` not working in mounts HOT 3
- Running `go test` for gopass modifies global config and also removes mounts HOT 3
- gopass 1.15.10 debian package broken HOT 8
- Feature: allow setting autosync.interval in minutes HOT 3
- `apt upgrade` fails with `gopass` due to `blank line in value of field 'Description'` HOT 1
- `gopass show --noparsing` does not work as expected unless it's forced
- Display Multi-line Passwords HOT 7
- Team function for importing a public key with sync (or via updates) is broken
- gopass otp gives git error HOT 3
- $PASSWORD_STORE_DIR expansion creates unintended directory structure when using fscopy HOT 2
- Including .gpg extension causes unintended results when calling fscopy HOT 9
- `gopass setup`: inconsistent behaviour and merge failure because of "unrelated histories" HOT 2
- gopass generate -g xkdc now fails if no language is set in config. HOT 1
- Feature Request: Wizard type multiline / editor HOT 4
- "Failed to check environment" & "Failed to list store" after fresh install HOT 1
- panic: runtime error: invalid memory address or nil pointer dereference HOT 3
- Feature Request: Ignoring passwords in the audit feature HOT 3
- gopass attempts to make GPG key despite there being one already HOT 3
- Feature request: configuration option to disable logo in notification HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gopass.