Skip to content

Instantly share code, notes, and snippets.

@musaid
Forked from maciakl/gist:4531580
Last active August 29, 2015 14:27
Show Gist options
  • Save musaid/59c64e3c4e86eb0f3bfa to your computer and use it in GitHub Desktop.
Save musaid/59c64e3c4e86eb0f3bfa to your computer and use it in GitHub Desktop.
Adding Ubuntu PPA repository behind a firewall. When you are behind a corporate firewall that only allows outbound traffic on ports 80 and 433 the usual apt-add-repository command will not work. To get around it. Here is the workaround.
# trying to install PPA behind firewall fails:
$ sudo add-apt-repository ppa:chris-lea/node.js
gpg: requesting key C7917B12 from hkp server keyserver.ubuntu.com
gpgkeys: HTTP fetch error 7: couldn't connect to host
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
recv failed
# this is how you get around it (use the key from the command above)
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C7917B12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment