Ubuntu 18.04.1, cannot add PPA wireguard/ubuntu/wireguard

I'm trying to install WireGurad on my fresh vanilla Ubuntu 18.04.1 machine, by following the instructions from WireGuard website. But when I try to execute very first command:

sudo add-apt-repository ppa:wireguard/wireguard

I'm getting the following error:

Cannot add PPA: 'ppa:~wireguard/ubuntu/wireguard'.
ERROR: '~wireguard' user or team does not exist.

Although there is WireGuard page at launchpad.net: https://launchpad.net/~wireguard/+archive/ubuntu/wireguard.

Any suggestion on how to install it?

Thanks!

UPDATE: The problem was in proxy settings (as the link from the accepted answer suggests). After exporting HTTP_PROXY and HTTPS_PROXY environment variables, everything works.


As a workaround, you could manually add the following to your /etc/apt/sources.list:

deb http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main 
deb-src http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic main 

And then sudo apt-get update.

You could see these steps in the WireGuard Launchpad page - reveal by expanding "Technical details about this PPA" and picking "Bionic 18.04" in the drop down.

The following post suggests that this error from add-apt-repository may be due to apt proxy settings, and gives a possible fix: Cannot add PPA - “user or team does not exist”.


Info from https://launchpad.net/~wireguard : This formerly was responsible for producing a PPA for WireGuard on Ubuntu. That functionality has now been folded into Ubuntu itself, so our old PPA has been removed. Simply run apt install wireguard on all Ubuntus ≥ 16.04.