Install haveged (example sudo apt-get install haveged) to speed up the random byte process. Then:
gpg --gen-key
gpg --list-keys
outputs:
pub 2048R/NNNNNNNN 2016-01-01
uid Name <
[email protected]>
sub 2048R/xxxxxxxx 2016-01-01
Then publish:
gpg --keyserver pgp.mi...