You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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? :)
The text was updated successfully, but these errors were encountered:
# 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"
.....
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? :)
The text was updated successfully, but these errors were encountered: