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

a standard way for batch-creation of passwords/notes? #220

Open
bogorad opened this issue Dec 4, 2024 · 3 comments
Open

a standard way for batch-creation of passwords/notes? #220

bogorad opened this issue Dec 4, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@bogorad
Copy link

bogorad commented Dec 4, 2024

I needed to batch-create a couple of keys, so I found a hacky way to do it (spawn a fake "editor" that echos some stuff into the file provided as argument, use it as EDITOR=, then immediately delete it), but - maybe - there should be a less hacky way? :)

@Anachron
Copy link

Anachron commented Dec 6, 2024

Yep I need to migrate a ton of passwords and an option to disable the editor and just use whatever is on stdin would be very appreciated.

@bogorad
Copy link
Author

bogorad commented Dec 6, 2024

you can use my hack for now:

    # Store private key in Bitwarden
    echo "Storing private key in Bitwarden..."
    # cleanup fake editor
    rm -rf /tmp/fake-editor.sh
    # create fake-editor.sh
    cat <<EOL > /tmp/fake-editor.sh
#!/usr/bin/env bash
echo "no-password" >\$1
cat $key_dir/key_file >>\$1
EOL
    # make it executable
    chmod +x /tmp/fake-editor.sh
    # now run rbw that will call our fake-editor
    EDITOR=/tmp/fake-editor.sh rbw add "$key_name" ||
    die "Failed to store key in Bitwarden"
.....

@doy doy added the enhancement New feature or request label Dec 27, 2024
@doy
Copy link
Owner

doy commented Dec 27, 2024

yeah, overriding EDITOR should work fine currently, but i'd be open to a pr adding a flag to accept the password to set on stdin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants