Configuring pass on Windows

In my last post, I concluded that pass wasn’t any good if you use Windows due to the lack of browser extension and flaky apps.  I’ve since discovered how to set up both the command-line pass client and the Firefox extension on Windows, so thought it was worth another post to explain what I did.  Note, this isn’t a straightforward process.  You’re probably only interested in this if you primarily use a Unix-like system, but need Windows support too.  pass isn’t currently an ideal solution if you primarily use Windows.  This also assumes you’re running 64-bit Windows 7, other versions may have slightly different paths in the commands.

Dependencies

To run pass on Windows, you need GPG, Cygwin and some Cygwin packages.

For GPG, download and install GPG4Win.

Next, download Cygwin and run the setup.  Install the following packages: git, make, automake, tree.  If you are using git to sync your password store, you may also want to install ssh.

Run the Cygwin shell and create an alias for gpg:

alias gpg='/cygdrive/c/Program\ Files\ \(x86\)/GNU/GnuPG/gpg2.exe'
alias gpg >> .bash_profile

Optional: You might find it easier to set your cygwin home directory to you Windows home directory with this command:

mkpasswd -l -p "$(cygpath -H)" > /etc/passwd

Read this page for more information about that command.

pass

To install pass in cygwin, download the zip and extract it.  In the cygwin shell, cd to the directory where you’ve extracted it, and run

make install

This will install pass to /usr/bin/pass within the cygwin environment.  You can now follow the regular instructions for setting up your password store. If you are using git you may need to set the PASSWORD_STORE_DIR environment variable:

echo "export PASSWORD_STORE_DIR=/cygdrive/c/Users/username/.password-store" >> ~/.bash_profile
. .bash_profile

Firefox extension

The firefox extension isn’t available for Windows on addons.mozilla.org (as it is for Linux), but you can download it directly from the Github page.

Once you’ve added it to Firefox, click the P icon on your toolbar and select Preferences.  Set the following values (note the double slashes!):

  • User Home: C:\\Users\\yourusername
  • Pass command: C:\\cygwin64\\bin\\bash.exe
  • Pass command line arguements: –login /usr/bin/pass

Thanks to this discussion for that information.

And that’s it!

Bookmark the permalink.

One Response to Configuring pass on Windows

  1. Pingback: Migrating Lastpass to pass password store - Barren, Frozen Wasteland

Leave a Reply

Your email address will not be published. Required fields are marked *

Unable to load the Are You a Human PlayThru™. Please contact the site owner to report the problem.