This question already has an answer here:

Every time I try to add a ppa I get this error message. I have tried with about a dozen PPA's
EDIT: UbuntuStudio 12.04

enter image description here

marked as duplicate by Avinash Raj, user117103, mikewhatever, Eric Carvalho, falconer Jan 24 '14 at 0:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


FINALLY SOLVED! There are several steps to get it working but it is well worth it in the end. As a bonus I learned a bit more about linux fixing it myself instead of relying on a GUI for everything. Because I was having the exact same problem with different distros (I tried Mint 15 cinnamon, UbuntuStudio 12.04, UbuntuStudio 13.04, and finally Ubuntu 12.04) I figured it was a problem with my internet. A comment above confirmed this. My internet is free wifi from where I live. It is behind an authenticated proxy. The problem seems to be directly related to the proxy internet I am receiving. When trying to add a PPA through the terminal I would get this error:

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 125, in <module>
    ppa_info = get_ppa_info_from_lp(user, ppa_name)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 84, in get_ppa_info_from_lp
pycurl.error: (35, 'gnutls_handshake() failed: An unexpected TLS packet was received.')

The solution is to manually add the PPAs to your sources list. Use the following command to open the sources list:

sudo gedit /etc/apt/sources.list

Add your PPAs at the bottom using the following structure:

deb http://ppa.launchpad.net/<user>/<repo>/ubuntu precise main

If my ppa is:


Then I need to add the following deb line to the bottom of the file. Note that I added a line above it as reference to the line below:

#for kdenlive 9.6
deb http://ppa.launchpad.net/sunab/kdenlive-release/ubuntu precise main

Save and close. Follow that with

sudo apt-get update

This will probably return an error regarding untrusted packages. You should see something with NO_PUBKEY and a string of numbers/letters such as B5115B98AA836CA8. Only this string of numbers/letters is needed. Copy and paste the following command in a terminal but replace the XXXXXX with your string of numbers/letters.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys XXXXXX

Follow that with:

sudo apt-get update

I spent 3 days surfing the internet to get this to work. I was extremely close to going back to windows. I hope this will be able to help someone else who was having the same problem.

  • I was stuck at this command for a while: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys XXXXXX When I replaced it with this one, it finally worked (changed the URL, not sure if the -E option affected it as well): sudo -E apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys XXXXXX – michalstanko Jul 8 '15 at 8:31

Just stumble upon the same issue , and I used another work around :

  • first of all , sudo su
  • then: export http_proxy="your.proxy.here" AND export https_proxy="your.proxy.here"

Then, run add-apt-repository xxxxxxxxx and it works.

The idea came to me after struggling before with installing something using python's PIP :)

Hope it helps.

Not the answer you're looking for? Browse other questions tagged or ask your own question.