Genzer / curiosity

List of my own curiosities
Apache License 2.0
0 stars 0 forks source link

Using pass on MacOS for storing credentials and used in Terminal #7

Open Genzer opened 2 months ago

Genzer commented 2 months ago

I wanted to use pass to store credentials, API keys etc to use on Terminal instead of keeping them in plaintext.

pass is a Linux (*Unix) tool but it has a macOS build on Homebrew.

macOS $> brew install pass gpg

However, it turned out that pass needs GnuPG as the "backend" for storing the encrypted credentials.

Genzer commented 2 months ago

When I attempted to insert a new credential, the error:

..

Genzer commented 2 months ago

Tried setting with https://gist.github.com/avoidik/9e7d63c85a20ac2d2fce37e131b44095 but still using EdDSA but it does not work.

Genzer commented 2 months ago

It turned out that using RSA is the only working solution so far.

gpg --batch --generate-key <<'EOF'
%echo Generating gpg key...
%# Key-Type: EdDSA
%# Key-Curve: Ed25519
%# Subkey-Type: EdDSA
Key-Type: RSA
Key-Length: 2048
Subkey-Type: RSA
Subkey-Length: 2048
Name-Real: MY NAME
Name-Email: MY_NAME@example.org
Name-Comment: final
Expire-Date: 0
%no-ask-passphrase
%no-protection
%commit
%echo done
EOF