I'm trying to set up pass on OSX. The installation instructions say to run:

pass init "ZX2C4 Password Storage Key"

But I don't to my knowledge have a GPG public key. Do I need to set one up?

I have an SSH public key. Can I use this instead? If so, how do I get the ID?


GnuPG is an implementation of the OpenPGP standard, and used by pass for encryption using an OpenPGP key pair. pass init expects an OpenPGP user ID or key ID as parameter. There are different ways to reference keys in GnuPG, the most common ones for use with pass are the full user ID (like Joe Tester <joe@example.org>) or the key ID (like DEADBEEFDEADBEEF).

You cannot really use SSH keys for OpenPGP. While they support the same cryptographic algorithms (like RSA), the formats are very different. Also, an OpenPGP key contains additional information like the key creation timestamp, and usually is connected to user IDs. While you theoretically could convert an SSH key to an OpenPGP key by adding those details, you cannot simply construct an equivalence between SSH and OpenPGP keys (though some people use OpenPGP authentication subkeys for SSH, but this is the other way round and easier to do as an SSH key does not require additional information compared to an OpenPGP key).

It is more reasonable to simply generate a new OpenPGP key. As OpenPGP keys are usually something you use for a very long time, read about some best practices before creating it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.