Cannot add PPA - "user or team does not exist"

When I run this command:

sudo add-apt-repository ppa:webupd8team/sublime-text-3

I get the following error:

Cannot add PPA: 'ppa:~webupd8team/ubuntu/sublime-text-3'.
ERROR: '~webupd8team' user or team does not exist

My proxy settings are working properly

what's the solution?

7

5 Answers

I found a working solution at add-apt-repository derrière un proxy d'entreprise (in French).

To summarize it, you have to export the env variables HTTP(S)_PROXY, lowercase and uppercase in your term.

Then execute:

sudo -E add-apt-repository ppa:...

The -E option will preserve the env vars defined above, and will enable the proxy use.

2

Running add-apt-repository without internet connection really does produce the same error message as in the question. One might consider the error message being incorrect or confusing like this as a bug though.

Adding the corresponding repositories is not enough unless you have an internet connection.

I fixed this by making an internet connection because the repositories had already been added.

Check this with: $ ping

2

In my case it was my company's man-in-the-middle fake SSL certificate that caused this misleading error. If you are on corporate internet, you may need to install your company's SSL cert at /usr/local/share/ca-certificates/yourcompany.crt and run sudo apt-get update && sudo apt-get install ca-certificates -y && update-ca-certificates

Also, consider your VPN activity when using WSL as in general VPN's and WSL (Ubuntu) don't mix well. So if you are receiving these errors with a VPN connected, try disabling your VPN and running the command again. This is an odd fix that should be attempted if the above mentioned solutions aren't working for you.

More info here: under the Bash loses network connectivity once connected to a VPN

1

It seems add-apt-repository doesn't use apt proxy settings (maybe it's using wget under the hood). A workaround is to tun the command from a machine which is not behind a proxy and to copy the files

/etc/apt/trusted.gpg.d/ondrej_ubuntu_php.gpg
/etc/apt/sources.list.d/ondrej-ubuntu-php-xenial.list

to the other machine.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like