Evidlo / passhole

A secure hole for your passwords (KeePass CLI)
GNU General Public License v3.0
199 stars 19 forks source link

"Your GPG key is untrusted" message even if key is trusted (MacOS) #12

Closed svscorp closed 5 years ago

svscorp commented 5 years ago

It is a great application and I almost made it working for my case, but it still says my gpg key for user "ansible" is untrusted, even though I set it to trusted:

keys:

$ gpg --list-keys
/Users/svscorp/.gnupg/pubring.kbx
---------------------------------------
pub   rsa1024 2018-11-29 [SC] [expires: 2020-11-28]
      60B0D083788C61FDA462C637DF8A9A54B720D6D2
uid           [ultimate] ansible

verify:

$ gpg --update-trustdb
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: next trustdb check due at 2020-11-28

new db creation:

$ ph  --database ./new-keepass.kdbx init
Enter your desired database password
Password:
Confirm:
Creating database at ./new-keepass.kdbx
Would you like to generate a keyfile? (Y/n): n
Your GPG key is untrusted.  Run gpg2 --edit-key "ansible" trust to change the trust level

versions:

gpg (GnuPG) 2.2.11
libgcrypt 1.8.4
ph 1.7.4
python 3.7.1
Evidlo commented 5 years ago

What command did you use to generate the key? Also, what version of the gpg utility did you use?

svscorp commented 5 years ago

Hi @Evidlo , thanks for fast response.

gpg --pinentry-mode loopback --batch --no-tty --yes --passphrase ansible --quick-gen ansible rsa1024
echo -e "5\ny\n" |  gpg --command-fd 0 --expert --edit-key ansible trust
Evidlo commented 5 years ago

Try this:

gpg --pinentry-mode loopback --batch --no-tty --yes --passphrase ansible --quick-gen ansible default

Also I think the second line is unnecessary.

svscorp commented 5 years ago

It worked!