Use apt-key adv --fetch-keys URL... instead of something like wget URL -O - | apt-key add - or curl URL | apt-key add -
apt-key adv --fetch-keys URL...
wget URL -O - | apt-key add -
curl URL | apt-key add -
Thanks, this came in handy for a Vagrant setup I'm working on.
The only issue with this is that you need to have a pretty new version of GnuPG to get https support. Since we're now in the age of encrypt everything you're back to the old way unless you want to risk installing it using a non-ssl link. I only stumbled on this issue because the key I wanted to install was only offered over https.