Just a small tip for me to remember when this happens again, as it was not easy to solve.
Arch Linux error
When trying to install something from AUR, after downloading it with git, I got this error.
==> Making package: caddy2 2.1.1-3 (Thu 09 Jul 2020 08:21:05 PM UTC) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... -> Updating caddy git repo... Fetching origin -> Found index-a509155e3cff18af793f6af5f930a71c89e05df8.html -> Found caddy.service -> Found caddy-api.service -> Found caddy.tmpfiles -> Found caddy.sysusers -> Found caddy.conf -> Found WarningCaddyfile ==> Validating source files with sha512sums... caddy ... Skipped index-a509155e3cff18af793f6af5f930a71c89e05df8.html ... Passed caddy.service ... Passed caddy-api.service ... Passed caddy.tmpfiles ... Passed caddy.sysusers ... Passed caddy.conf ... Passed WarningCaddyfile ... Passed ==> Verifying source file signatures with gpg... caddy git repo ... FAILED (unknown public key 2A349DD577D586A5) ==> ERROR: One or more PGP signatures could not be verified!
The solution is really simple, but it was hard for me to find it out. Just need to enter this command.
gpg --keyserver keys.gnupg.net --recv-keys <key>
So, to solve the specific problem I had with caddy server it would be:
gpg --keyserver keys.gnupg.net --recv-keys 2A349DD577D586A5