I really have no idea what is again a problem here… look, it should work like that:
$ bash <(curl -s "https://notabug.org/megavolt/random-scripts/raw/master/fix-gpg-pacman.sh")
[INFO] Removing lock files of pamac and pacman
[INFO] Switching to global mirror (Manjaro's CDN)
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
::INFO User generated mirror list
::------------------------------------------------------------
::INFO Custom mirror file saved: /var/lib/pacman-mirrors/custom-mirrors.json
::INFO Using custom mirror file
::INFO Querying mirrors - This may take some time
0.760 Global : https://mirrors.fossho.st/manjaro/
0.470 Global : https://mirrors.manjaro.org/repo/
::INFO Writing mirror list
::Global : https://mirrors.manjaro.org/repo/unstable/$repo/$arch
::Global : https://mirrors.fossho.st/manjaro/unstable/$repo/$arch
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
::INFO To reset custom mirrorlist 'sudo pacman-mirrors -id'
::INFO To remove custom config run 'sudo pacman-mirrors -c all'
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
::INFO Using custom mirror file
::INFO Querying mirrors - This may take some time
0.202 Global : https://mirrors.fossho.st/manjaro/
0.468 Global : https://mirrors.manjaro.org/repo/
::INFO Writing mirror list
::Global : https://mirrors.fossho.st/manjaro/unstable/$repo/$arch
::Global : https://mirrors.manjaro.org/repo/unstable/$repo/$arch
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
[INFO] Remove pacman's gnupg
removed '/etc/pacman.d/gnupg/S.gpg-agent'
removed '/etc/pacman.d/gnupg/S.gpg-agent.browser'
removed '/etc/pacman.d/gnupg/S.gpg-agent.extra'
removed '/etc/pacman.d/gnupg/S.gpg-agent.ssh'
removed '/etc/pacman.d/gnupg/gpg-agent.conf'
removed '/etc/pacman.d/gnupg/gpg.conf'
removed '/etc/pacman.d/gnupg/openpgp-revocs.d/F6893E86D66E78B1BABABC674D2E5D15A237D3C7.rev'
removed directory '/etc/pacman.d/gnupg/openpgp-revocs.d'
removed '/etc/pacman.d/gnupg/private-keys-v1.d/873A4530121DDEBC9CD9E42EB7CB5171C92A18BF.key'
removed directory '/etc/pacman.d/gnupg/private-keys-v1.d'
removed '/etc/pacman.d/gnupg/pubring.gpg'
removed '/etc/pacman.d/gnupg/pubring.gpg~'
removed '/etc/pacman.d/gnupg/secring.gpg'
removed '/etc/pacman.d/gnupg/tofu.db'
removed '/etc/pacman.d/gnupg/trustdb.gpg'
[INFO] Re-initilize pacman's gnupg
gpg: /etc/pacman.d/gnupg/trustdb.gpg: trustdb created
gpg: no ultimately trusted keys found
==> Generating pacman master key. This may take some time.
gpg: Generating pacman keyring master key...
gpg: directory '/etc/pacman.d/gnupg/openpgp-revocs.d' created
gpg: revocation certificate stored as '/etc/pacman.d/gnupg/openpgp-revocs.d/982F0889726C40260BD443C628696AC328387DCA.rev'
gpg: Done
==> Updating trust database...
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
[INFO] Removing package cache
[INFO] Downloading the newest packages which contains the gpg keys in /tmp/tmp.pKPMb3wu93
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
resolving dependencies...
Packages (2) archlinux-keyring-20221220-1 manjaro-keyring-20221028-4
Total Download Size: 1.66 MiB
:: Proceed with download? [Y/n]
:: Retrieving packages...
archlinux-keyring-20221220-... 1153.7 KiB 3.00 MiB/s 00:00 [##################################] 100%
manjaro-keyring-20221028-4-any 541.6 KiB 2.40 MiB/s 00:00 [##################################] 100%
Total (2/2) 1695.3 KiB 2.78 MiB/s 00:01 [##################################] 100%
(2/2) checking keys in keyring [##################################] 100%
(2/2) checking package integrity [##################################] 100%
[INFO] Installing Keyring Packages
loading packages...
warning: archlinux-keyring-20221220-1 is up to date -- reinstalling
warning: manjaro-keyring-20221028-4 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (2) archlinux-keyring-20221220-1 manjaro-keyring-20221028-4
Total Installed Size: 2.30 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n]
(2/2) checking keys in keyring [##################################] 100%
(2/2) checking package integrity [##################################] 100%
(2/2) loading package files [##################################] 100%
(2/2) checking for file conflicts [##################################] 100%
(2/2) checking available disk space [##################################] 100%
:: Running pre-transaction hooks...
(1/1) Creating Timeshift snapshot before upgrade...
==> skipping timeshift-autosnap due skipAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
:: Processing package changes...
(1/2) reinstalling archlinux-keyring [##################################] 100%
==> Appending keys from archlinux.gpg...
==> Locally signing trusted keys in keyring...
-> Locally signed 6 keys.
==> Importing owner trust values...
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: inserting ownertrust of 4
gpg: setting ownertrust to 4
==> Disabling revoked keys in keyring...
-> Disabled 57 keys.
==> Updating trust database...
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 1 signed: 6 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1 valid: 6 signed: 95 trust: 0-, 0q, 0n, 6m, 0f, 0u
gpg: depth: 2 valid: 75 signed: 26 trust: 75-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2023-04-21
==> Updating trust database...
gpg: next trustdb check due at 2023-04-21
(2/2) reinstalling manjaro-keyring [##################################] 100%
==> Appending keys from manjaro.gpg...
gpg: error reading key: No public key
gpg: error reading key: No public key
gpg: error reading key: No public key
gpg: error reading key: No public key
gpg: error reading key: No public key
gpg: error reading key: No public key
gpg: error reading key: No public key
gpg: error reading key: No public key
==> Locally signing trusted keys in keyring...
-> Locally signed 18 keys.
==> Importing owner trust values...
gpg: inserting ownertrust of 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: inserting ownertrust of 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: inserting ownertrust of 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
==> Disabling revoked keys in keyring...
-> Disabled 8 keys.
==> Updating trust database...
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 1 signed: 22 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1 valid: 22 signed: 95 trust: 0-, 0q, 0n, 22m, 0f, 0u
gpg: depth: 2 valid: 75 signed: 26 trust: 75-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2023-04-21
:: Running post-transaction hooks...
(1/2) Reloading system manager configuration...
(2/2) Arming ConditionNeedsUpdate...
[INFO] Removing temporary directory: /tmp/tmp.pKPMb3wu93
removed '/tmp/tmp.pKPMb3wu93/manjaro-keyring-20221028-4-any.pkg.tar.xz'
removed '/tmp/tmp.pKPMb3wu93/archlinux-keyring-20221220-1-any.pkg.tar.zst'
removed '/tmp/tmp.pKPMb3wu93/pacman.conf'
removed directory '/tmp/tmp.pKPMb3wu93'
[INFO] Switching to a local mirror by GeoIP
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
::INFO User generated mirror list
::------------------------------------------------------------
::INFO Custom mirror file saved: /var/lib/pacman-mirrors/custom-mirrors.json
::INFO Using default mirror file
::INFO Querying mirrors - This may take some time
0.344 Germany : https://mirror.alpix.eu/manjaro/
0.254 Germany : https://mirrors.xtom.de/manjaro/
0.311 Germany : https://ftp.gwdg.de/pub/linux/manjaro/
0.258 Germany : https://mirror.23m.com/manjaro/
0.306 Germany : https://ftp.halifax.rwth-aachen.de/manjaro/
0.234 Germany : http://ftp.tu-chemnitz.de/pub/linux/manjaro/
0.291 Germany : https://mirror.netcologne.de/manjaro/
0.260 Germany : https://mirror.moson.org/manjaro/
0.333 Germany : https://mirror.tarnkappe.info/manjaro/
::INFO Writing mirror list
::Germany : http://ftp.tu-chemnitz.de/pub/linux/manjaro/unstable
::Germany : https://mirrors.xtom.de/manjaro/unstable
::Germany : https://mirror.23m.com/manjaro/unstable
::Germany : https://mirror.moson.org/manjaro/unstable
::Germany : https://mirror.netcologne.de/manjaro/unstable
::Germany : https://ftp.halifax.rwth-aachen.de/manjaro/unstable
::Germany : https://ftp.gwdg.de/pub/linux/manjaro/unstable
::Germany : https://mirror.tarnkappe.info/manjaro/unstable
::Germany : https://mirror.alpix.eu/manjaro/unstable
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
::INFO Using custom mirror file
::INFO Querying mirrors - This may take some time
0.323 Germany : https://ftp.gwdg.de/pub/linux/manjaro/
0.441 Germany : https://mirror.alpix.eu/manjaro/
0.232 Germany : https://mirrors.xtom.de/manjaro/
0.260 Germany : https://mirror.moson.org/manjaro/
0.214 Germany : http://ftp.tu-chemnitz.de/pub/linux/manjaro/
::INFO Writing mirror list
::Germany : http://ftp.tu-chemnitz.de/pub/linux/manjaro/unstable/$repo/$arch
::Germany : https://mirrors.xtom.de/manjaro/unstable/$repo/$arch
::Germany : https://mirror.moson.org/manjaro/unstable/$repo/$arch
::Germany : https://ftp.gwdg.de/pub/linux/manjaro/unstable/$repo/$arch
::Germany : https://mirror.alpix.eu/manjaro/unstable/$repo/$arch
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
[INFO] Performing a full upgrade with pacman
Do you want to continue? [Yy/Nn] (Be aware that a full upgrade needs enough ram on a live session)y
Continue...
:: Synchronizing package databases...
core 164.3 KiB 625 KiB/s 00:00 [##################################] 100%
extra 1859.3 KiB 3.47 MiB/s 00:01 [##################################] 100%
community 7.5 MiB 4.74 MiB/s 00:02 [##################################] 100%
multilib 169.3 KiB 1078 KiB/s 00:00 [##################################] 100%
:: Starting full system upgrade...
there is nothing to do
[INFO] Done. Note that you need to refresh the database for pamac also.
Maybe you blindly copy&paste and didn’t see that the “)” at the end was missing?
I added the installation of gnupg. Maybe your gnupg is just broken for what ever reason.
ok well… to skip the gpg verification for now try this:
sudo pacman-mirrors -c Global
sudo cp /etc/pacman.conf /etc/pacman.conf.backup
sudo sed --in-place --regexp-extended 's/^(SigLevel).+$/\1 = Never/g' /etc/pacman.conf
sudo pacman -Syyuu
Now it should update from Manjaro’s global mirror without gpg verification. I would not recommend that, but using the global minimize the risk of installing manipulated packages. I would not do that on random mirrors.