Ubuntu – How to get add-apt-repository to work

add-apt-repositoryaptcommand linesoftware-sources

Whenever I try to add a repository via the command line, I get the following error message:

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 80, in get_ppa_info_from_lp
    curl.perform()
pycurl.error: (60, 'server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none')

Is there a way to remedy this situation?

Best Answer

You need to make sure your date is set, the certificates have a valid from date and if your system date is 01-01-1970, all certificates will fail.

Use something like

date -s "Oct 9 05:16:00 UTC 2012"

then try again with add-apt-repository.