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

Question: is it possible to mass import passes? #339

slackhead opened this Issue Dec 24, 2017 · 2 comments


None yet
2 participants

slackhead commented Dec 24, 2017

I have a python script an exported all my passwords from firefox. I would like to add them to pass, but doing it one by one and with a password prompt would be messy.

Is there way I can import them automatically? Even if I wrote a shell script to read my password file and add that way it would be acceptable.

What are my options?


This comment has been minimized.


jounathaen commented Dec 25, 2017

At the moment, I don't have the time to give you an exact solution, but QtPass is basically a GUI for Pass, which is an command line Tool.
It should be rather easy to automatise this with a script.
Something like pass insert blah blubber.
You can use pass on the same repository as you use for QtPass.


This comment has been minimized.

slackhead commented Dec 26, 2017

This is what I came up with, if it's of use to anyone else:

Add passwords into ~/.password-store
passes.txt is created using from:

python [firefox profile] > passes.txt

(Enter master password if there is one.)

You will need to check the first line of passes.txt, and if it's
blank, delete it.

WC=$(wc -l $PFILE | awk '{print $1}')

for entry in $(seq 0 4 $WC)
unset ENTRY
for index in seq 1 3
ENTRY="$ENTRY$(head -n $((index+entry)) $PFILE | tail -n 1)\n"

URL=$(echo -e $ENTRY | grep Website: | awk '{print $2}'
| sed -r 's,^http[s]?://,,')

US=$(echo -e $ENTRY | grep Username: | awk '{print $2}'
| sed -r "s,',,g")

PW=$(echo -e $ENTRY | grep Password: | awk '{print $2}'
| sed -r "s,',,g")

echo "Processing $URL"
(echo $PW; echo "user: $US") | pass insert -f -m $URL

Ugh github uses hashes for formatting even when using code tags...

@slackhead slackhead closed this Dec 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment