I tried adding a lot of PPA's in my newly installed Ubuntu 18.04.1 (LTS)
PPA for Adapta
sudo add-apt-repository ppa:tista/adapta
PPA for Macbuntu
sudo add-apt-repository ppa:noobslab/macbuntu
and I waited for a long time and then I got this output
[sudo] password for sumeet:
This PPA is dedicated to Macbuntu transformation pack for Ubuntu.
More info: https://launchpad.net/~noobslab/+archive/ubuntu/macbuntu
Press [ENTER] to continue or Ctrl-c to cancel adding it.
I pressed "Enter" key and got this
Error: retrieving gpg key timed out.
^Z
[1]+ Stopped sudo add-apt-repository ppa:noobslab/macbuntu
I've tried Rebooting and I've tried reinstalling the complete operating system. I've tried to add more than 10 PPA's
It means that your system cannot access
keyserver.ubuntu.com
due some Network erros.But you can manually add key for this repository(here is example for adapta).
https://launchpad.net/~tista/+archive/ubuntu/adapta
keyserver.ubuntu.com
where you can manually download Public key for ppa repository. Click on link and you will get the the public keyBEGIN
andAND
(including lines with begin and end)sudo apt-get update && sudo apt-get install adapta-gtk-theme
If it works than contact you ISP about this issue.
If it fails please provide your console output.
For me it was some issue with IPv6.
I went to Settings -> Network -> Wired -> IPv6 and changed "IPv6 Method" from "Disable" to "Automatic". After that I disabled and re-enabled the connection and tried again.
The command worked much faster and I didn't get time out error anymore.