Adding a custom repository to aptitude: launchpad

Sometimes you need to install software on your linux box, which couldn’t be found over the normal repositories.

Me for example tried to install XBMC

add-apt-repository ppa:team-xbmc

First i got this error:

Error: can't find signing_key_fingerprint at <a href=""></a>

I spelt XBMC incorrect (wrong: XMBC)

So if you spelt your software correctly or copyed your commandlines from a reliable source the following will happen:

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver --recv xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

So when you execute your add-apt-repositry command it implicity executes the above command. As you can see the gpg (i always mix this up with pgp) launches with a lot of parameters which you cannot remember if you are not that interessted.

And as you know problems always come in packs just look at the lines below

gpg: requesting key xxxxxxx from hkp server
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error

The thing is that GPG cannot go over https. More to read here. So we need to edit the preferences that GPG is forced to get the keys over http. Just edit with following line

vim /usr/share/pyshared/softwareproperties/

Search for


and edit it to


Edit this back when you are done installing your software from launchpad. Otherwise you are getting your software insecurely and aptitude is always nagging about it 😉

gpg: requesting key 91E7EE5E from hkp server
gpg: key 91E7EE5E: public key "Launchpad PPA for XBMC for Linux" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

Execute your last command and you will see the above. And for the fact, that I am very talented to missspell something here is another error I got:

W: Failed to fetch  404  Not Found

But this one is easy. I only entered a wrong PPA address before.

Just go to this file

vim /etc/apt/sources.list.d/
and delete all the wrong lines out of it.
So that should it be. Stay entertained!

Linux Proxies

When you run Linux which is not directly connected to the internet you normally encounter several problems. Things like that your linux cannot resolv a DNS name or cannot connect to specific source (couldn’t connect to host). This is normally in a corporate network where not every computer is intended to be directly connected with the internet but instead to a proxy.

Here are the most common proxy-settings I use. Just hack it into your command line interface, also called bash or terminal.

  • System Proxy
export http_proxy=http://user:password@hostname:port
export https_proxy=http://user:password@hostname:port
export ftp_proxy=http://user:password@hostname:port
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$https_proxy
export FTP_PROXY=$ftp_proxy
The last three lines are for programms which ask the proxies in upper case. I do not know if this is neccesary but it seems to be that the Ubuntu developers think so.
  • WGET Proxy
vim /etc/wgetrc
vi /etc/wgetrc

and add these lines

https_proxy = http://user:password@hostname:port
http_proxy = http://user:password@hostname:port
ftp_proxy = http://user:password@hostname:port
You may also need another proxy for your Ubuntu, Debian and other forks.
  • Aptitude (apt-get) Proxy (this file might not exist. Create it and save it)
vim /etc/apt/apt.conf
and add this line
Acquire::http::Proxy "http://user:password@hostname:port";
  • SVN Proxy
vim /etc/subversion/servers
search for this:
# http-proxy-exceptions = *,
<strong>http-proxy-host = http-proxy-port = yourproxyport</strong>
# http-proxy-username = defaultusername
# http-proxy-password = defaultpassword

If you receive an error like this:

/etc/subversion/servers:71: Option expected

than you need to remove the space ‘ ‘ character in front of your line. Your proxy line must begin at position 1.

Remember the standard ports

  • HTTP: 80
  • HTTPS: 443
  • FTP: 21
Some proxyproviders also take portnumbers for http like: 8080,3128 and following.

Now you are done. Go internetting with your Linux!