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

Reading from pipes #174

Closed
pkoch opened this issue May 13, 2022 · 7 comments · May be fixed by #180
Closed

Reading from pipes #174

pkoch opened this issue May 13, 2022 · 7 comments · May be fixed by #180

Comments

@pkoch
Copy link

pkoch commented May 13, 2022

I'd like to add something like bw --raw export --format json | pass import -fa bitwarden - to my cron.

However, it seems like pass-import always wants a file to read from, and not a pipe. Is this something you'd be open to get a PR for? Where's the right place to make this change, roughly?

@roddhjav
Copy link
Owner

This used to be a feature of pass-import, I removed it long time ago as it was causing issues for some pm (and because nobody was using it). The good news it that pass-import still has the logic to support it.

So PR are more than welcome. You should hack around the detectmanager function in the main file. The stdin file should go into conf['in']. Then it should somewhat work as this conf['in'] is later given to the password manager class and used as file, see here

If you get an issue with format detection you can force it to use a given import class with pass import BitwardenJSON -

Note: direct import using the bw cli is a planned feature (currently in test phase), so in the future you should be able to directly use something like pass import bitwarden to do the same thing.

@pkoch
Copy link
Author

pkoch commented May 15, 2022

This used to be a feature of pass-import, I removed it long time ago as it was causing issues for some pm (and because nobody was using it).

Can you perhaps point me to the ticket/PR for the problems you had that made you want to take this out? Ideally, I'd try to sidestep those.

direct import using the bw cli is a planned feature (currently in test phase), so in the future you should be able to directly use something like pass import bitwarden to do the same thing.

Hmm, maybe I should concentrate on helping on this, then! Where can I join the fun?

@roddhjav
Copy link
Owner

I removed stdin in 6d2e2fb it was part of the dev branch (see #84). Now this was during the version 2 of the project, so many things changed since that it might be useless.

I will push the wip bw support on the dev branch once I get some time.

@pkoch
Copy link
Author

pkoch commented Jun 14, 2022

I've since concentrated all my password on Bitwarden, and I've been happy enough using it.

But I'd be interested to know when your new bw code is in, and maybe our schedules/needs will align then.

@roddhjav
Copy link
Owner

roddhjav commented Jun 19, 2022

You can now try 7b7bb4d from the dev branch (#180). But please note, this is still in dev stage. I usually do not commit such code that is not fully tested in CI (it should still works fine for basic use), but as I do not have time to work on this these days, it seems fair to allow you to play with it anyway.

To try it, from the dev branch: pass import -vvv bitwarden <bitwarden-email>

@pkoch
Copy link
Author

pkoch commented Jun 19, 2022

Thank you for sharing! 🙌

However, I'm at a point in my life where other obligations prevent playing with this from bubbling up in my priority stack.

I'll let you know if I happen to get a chance, tho!

@roddhjav roddhjav linked a pull request Sep 28, 2022 that will close this issue
@roddhjav
Copy link
Owner

For future me: this feature is currently not a priority.

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 a pull request may close this issue.

2 participants