Archit Arora Archit Arora - 23 days ago 7
Linux Question

Apt-get not working after setting proxy in ubuntu server

Hi Im using ubuntu server.
I have set the proxies using :

echo "export http_proxy='http://username:password@proxyIP:port/'" | tee -a ~/.bashrc


Ive set up http, https and ftp proxies.
Wget
works fine but
apt-get
does not connect.
Please help!

Answer

I don't know about apt-get but I've never got yum to work with the environment variables. Instead, I've had to set the proxy via its config.

Here's a related post for the apt-get conf:
http://askubuntu.com/questions/89437/how-to-install-packages-with-apt-get-on-a-system-connected-via-proxy

Also... how awesome is plain-text passwords sitting in a file that's public-readable by default! (or environment variables and bash history for that matter)