Update (2021-02-12): the script did not work well, it was missing the username field from keepass.
First, you'll need to create a gpg key if you do not have one:
Then you can init your pass respository (with git, in our case):
pass init user
Put it under git control:
pass git init
Now you could add a password with:
pass insert test
It will ask you for the passord and you can see it added with:
Nevertheless, my objective was to import to this new database the keepass database. For this, you can open the keepass program and export the database as a
Since keepass will put quotes (") for each field and if your names and passwords do not contain them, you can delete them to simplify the importing program (with your prefered editor, for example).
Then, you can run the program:
#!/bin/sh if [ $# -eq 0 ] then echo "You must provide a file name" exit fi while IFS=, read -r f1 f2 f3 f4 f5 f6 f7 f8 ; do echo "Creating pass entry for $f1 $f2"; echo "$f4" | pass insert -e "$f1/$f2" sleep 1 done < "$1"
You can download (no guarantee) from keepassToPass.sh