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

Issues #6

Open
derritter88 opened this issue Oct 24, 2020 · 3 comments
Open

Issues #6

derritter88 opened this issue Oct 24, 2020 · 3 comments

Comments

@derritter88
Copy link

Hi there,

thanks for creating such smart shell command!!!

May I just suggest two things which comes up on my side?

  1. Add the session ID

bash <(bw list items **--session xxxxxxx** | jq -r '.[] | select(.attachments != null) | . as $parent | .attachments[] | "bw get attachment \(.id) --itemid \($parent.id) --output \"./export/attachments/\($parent.id)/\(.fileName)\""')

  1. Not sure what I am doing wrong but Bitwarden wants to know my password at every single attachment export - if there are one or two I do not care, but if there are a lot it's getting annoying.
@ckabalan
Copy link
Owner

Thanks for the big report. I'll look into this soon and make any appropriate adjustments! I suspect the password prompting may be previous bw commands caching my login or something. I'll figure that out and add it to the instructions or at least make a note.

@derritter88
Copy link
Author

No problem - I am always happy to help with logging issues.

Not sure if you're into that but it might be also a smart idea to implement your script into a general bash script which does the login, saves the session ID into a variable, exports the "plain-text-only" json and finally run your script?!

@Alexander-Shukaev
Copy link

Alexander-Shukaev commented Jan 7, 2022

Yo, there appears to be a regression in Bitwarden CLI, at least that's how I understand it. Exported environment variable BW_SESSION is supposed to keep the vault unlocked in any subprocess. See bitwarden/cli#378, people seem to report that it worked for them, but it no longer works for me, password prompts upon export come regardless, while they don't upon sync.

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

No branches or pull requests

3 participants