Skip to content

Instantly share code, notes, and snippets.

@maciakl
Last active April 20, 2021 11:17
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save maciakl/4531580 to your computer and use it in GitHub Desktop.
Save maciakl/4531580 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