<
Neerav Mehta
Founder & CEO
Have you ever tried to install an apt package from a third-party repository from behind a firewall? If you run apt-key command with a key server, firewall will block it. Read this post to find out how to get past the firewall to import key for a third-party apt package.
Apt-get package management uses public key cryptography to authenticate downloaded packages. Each time you add another apt repository to /etc/apt/sources.list, you'll also have to give apt its key if you want apt to trust it. This can easily be done using apt-key command with keys.gnupg.net as keyserver. Here is an example which imports key for Percona XtraDB:
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
This command contacts the server keys.gnupg.net which in trun redirects to one of umpteen servers which are hosting the key. Behind a firewall, this external request will get blocked. An easy solution to this problem is to import the key manually. Here are the steps to do so:
Click on the link in the "pub" section as shown above. You will see the actual key:
sudo apt-key add keyfile
suao apt-get update
Voila! Your key should get imported and now you can proceed with software installation using apt-get install.
Neerav Mehta
Neerav Mehta is the Founder & CEO of Red Crackle. With sterling qualities, Neerav’s technological acumen is firing a generation of progressive companies on the digital path. With an undergraduate degree in Electrical Engineering from India's most prestigious institution IIT Bombay and having spent seven years developing and contributing to the launch of AMD's innovative line of computer products, Neerav founded Red Crackle where he is lauded for his dynamic and innovative genius.
Let’s get you started!