gpg: keyserver refresh failed WSL2 / Ubuntu 22.04 and 24.04
Running swiftly install latest is giving me the following error:
sam@clear-air-turbulence ~> swiftly install latest
Fetching the latest stable Swift release...
Refreshing Swift PGP keys...
gpg: keyserver refresh failed: Server indicated a failure
Error: Failed to refresh PGP keys: Error(message: "gpg exited with non-zero status: 2")
Initially I had this on WSL2 with Ubuntu 22.04. I have just done a clean WSL2 install of Ubunu 24.04 to see if it helped, but I got the same error.
It may of course be an issue locally (eg with Windows or my local network). I don't really have enough context to be sure.
Swiftly is relying on the ubuntu key server, which has had outages and problems in the past. Maybe it should have at least one fallback trusted key server if the first one fails to spread out the dependency more.
The current discussion on this is that keys should be refreshed directly from swift.org and not the third-party ubuntu keyserver.
This was fixed with #165