Skip to content

Instantly share code, notes, and snippets.

@esparta
Last active December 26, 2015 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esparta/7129227 to your computer and use it in GitHub Desktop.
Save esparta/7129227 to your computer and use it in GitHub Desktop.
Apt-get behind proxy
#Add-apt-repository behind proxy
#---- Long Term Solution ---
#Set export variables onto .bashrc
sudo nano ~/.bashrc
#Add following lines
echo "export http_proxy=http://url:port" >> ~/.bashrc
echo "export https_proxy=http://url:port" >> ~/.bashrc
#Preserve environment variables
sudo visudo
# Add the following line
#Defaults env_keep = "http_proxy https_proxy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment