I had the same issue with emacs-nox, but I have installed it on Windows 10 inside of WSL2 with Ubuntu 18.04.
I was able to workaround the issue with:
gpg --homedir ~/.emacs.d/elpa/gnupg --keyserver hkps://keyserver.ubuntu.com:443 --receive-keys 066DAFCB81E42C40
After successfully importing the key, a package-refresh-contents worked fine.
I had the same issue with emacs-nox, but I have installed it on Windows 10 inside of WSL2 with Ubuntu 18.04.
I was able to workaround the issue with: d/elpa/ gnupg --keyserver hkps:// keyserver. ubuntu. com:443 --receive-keys 066DAFCB81E42C40
gpg --homedir ~/.emacs.
After successfully importing the key, a package- refresh- contents worked fine.