You are not logged in.

#1 2023-07-22 01:22:33

Dominik
Member
Registered: 2021-12-21
Posts: 25

[SOLVED] PGP and key issues - `yay` doesn't work or pacman-key

If I try to install a AUR package from yay like `yay 1password`, it fails to import the PGP key. As shown:
```
==> Making package: 1password 8.10.8-45 (Fri 21 Jul 2023 09:12:25 PM EDT)
==> Retrieving sources...
  -> Found 1password-8.10.8.x64.tar.gz
  -> Found 1password-8.10.8.x64.tar.gz.sig
==> Validating source files with sha256sums...
    1password-8.10.8.x64.tar.gz ... Passed
    1password-8.10.8.x64.tar.gz.sig ... Passed
==> Verifying source file signatures with gpg...
    1password-8.10.8.x64.tar.gz ... FAILED (unknown public key AC2D62742012EA22)
==> ERROR: One or more PGP signatures could not be verified!
-> error downloading sources: /home/dominik/.cache/yay/1password
     context: exit status 1
    

:: (1/1) Parsing SRCINFO: 1password
gpg: error reading key: No public key

:: PGP keys need importing:
-> 3FEF9748469ADBE15DA7CA80AC2D62742012EA22, required by: 1password
:: Import? [Y/n] Y
:: Importing keys with gpg...
gpg: no writable keyring found: Not found
gpg: error reading '[stream]': General error
gpg: Total number processed: 0
-> problem importing keys
```

I've looked up this issue and various things and tried them all. `sudo pacman -Syyu` works just fine. I can update and sync properly.
I will attach the logs from the key refresh if I can some how. It hangs. And also throws random "General errors".

Do I need to have some keyring service running in systemd?

Last edited by Dominik (2023-07-22 17:15:18)

Offline

#2 2023-07-22 01:24:12

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: [SOLVED] PGP and key issues - `yay` doesn't work or pacman-key

So do it directly instead of using yay.

Also note, pacman-key has nothing to do with this at all.

Last edited by Scimmia (2023-07-22 01:24:35)

Offline

#3 2023-07-22 04:06:00

Dominik
Member
Registered: 2021-12-21
Posts: 25

Re: [SOLVED] PGP and key issues - `yay` doesn't work or pacman-key

How to do this?
`pacman -S 1password` does not find a package.

Offline

#4 2023-07-22 06:09:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: [SOLVED] PGP and key issues - `yay` doesn't work or pacman-key

Because it's in the AUR, https://aur.archlinux.org/packages/1password
https://wiki.archlinux.org/title/Arch_User_Repository

There's also a pinned comment with a link that explains how to add the key.

Sidenote:

sudo pacman -Syyu

man pacman

Read up what the second "y" actually does, then stop using it unless you *really* mean to.

Offline

#5 2023-07-22 14:51:38

Dominik
Member
Registered: 2021-12-21
Posts: 25

Re: [SOLVED] PGP and key issues - `yay` doesn't work or pacman-key

seth wrote:

Because it's in the AUR, https://aur.archlinux.org/packages/1password
https://wiki.archlinux.org/title/Arch_User_Repository

There's also a pinned comment with a link that explains how to add the key.

Sidenote:

sudo pacman -Syyu

man pacman

Read up what the second "y" actually does, then stop using it unless you *really* mean to.

Following the instructions posted I still get gpg issues. Similar to before when trying to import the key :
[dominik@archdom ~]$  curl -sS https://downloads.1password.com/linux/k … ssword.asc | gpg --import
gpg: key AC2D62742012EA22: 3 signatures not checked due to missing keys
gpg: no writable keyring found: Not found
gpg: error reading '[stdin]': General error
gpg: import from '[stdin]' failed: General error
gpg: Total number processed: 0

Offline

#6 2023-07-22 15:47:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: [SOLVED] PGP and key issues - `yay` doesn't work or pacman-key

ls -la ~/.gnupg
echo $GNUPGHOME

Offline

#7 2023-07-22 16:30:29

Dominik
Member
Registered: 2021-12-21
Posts: 25

Re: [SOLVED] PGP and key issues - `yay` doesn't work or pacman-key

seth wrote:
ls -la ~/.gnupg
echo $GNUPGHOME

[dominik@archdom ~]$ ls -la ~/.gnupg
total 92
drwx------ 1 dominik dominik   238 Jul 19 16:19 .
drwx------ 1 dominik dominik   710 Jul 22 11:03 ..
drwx------ 1 dominik dominik    14 Jul 19 16:19 crls.d
drwx------ 1 root    root        0 Jul 16 15:10 private-keys-v1.d
-rw-r--r-- 1 root    root    78018 Jul 16 15:10 pubring.kbx
-rw-r--r-- 1 root    root     6012 Jul 16 15:10 pubring.kbx~
srwx------ 1 root    root        0 Jul 16 15:10 S.gpg-agent
srwx------ 1 root    root        0 Jul 16 15:10 S.gpg-agent.browser
srwx------ 1 root    root        0 Jul 16 15:10 S.gpg-agent.extra
srwx------ 1 root    root        0 Jul 16 15:10 S.gpg-agent.ssh
-rw------- 1 dominik dominik  1200 Jul 16 15:10 trustdb.gpg
[dominik@archdom ~]$ echo $GNUPGHOME

[dominik@archdom ~]$

Offline

#8 2023-07-22 16:33:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,129

Re: [SOLVED] PGP and key issues - `yay` doesn't work or pacman-key

Well, the problem is rather obvious.
Stop casually sudo'ing stuff and fix the permissions.

Offline

#9 2023-07-22 17:14:18

Dominik
Member
Registered: 2021-12-21
Posts: 25

Re: [SOLVED] PGP and key issues - `yay` doesn't work or pacman-key

Yes, thanks for pointing that out @seth. Changing the permissions fixed my issue.

The strange thing is this was an issue on a fresh install. So in my attempts to fix it I probably ran a sudo command to try and fix it. Oh well.

Offline

Board footer

Powered by FluxBB