Proxy server can be set up for ubuntu's apt-get through one of the below methods
1) Modifying the apt.conf file
open /etc/apt/apt/.conf file with root permissions by using the following command
1) Modifying the apt.conf file
open /etc/apt/apt/.conf file with root permissions by using the following command
sudo vim /etc/apt/apt.conf (i use vim text editor . If you use gedit replace vim with gedit) add the following line to the file.
acquire::http::Proxy "http://username:password@proxyserver:port"
ex: acquire::http::Proxy "http://pratap:mypassword@netmon.iitb.ac.in:80"
2) setting proxy via terminal
The other method is directly using command line. The command is as follows
export http_proxy=http://username:password@host:port/
Many users think that once they have their proxy settings in main menu's
system->preferences right , they are done. But the apt-get needs the settings to be done through apt.conf file.
@/other special characters in password
One more think to note is that if your password contains '@' it needs to be replaced with %40.I struggled a lot to find this out. This is a bug in ubuntu( for details about the bug refer http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500560 ) . This link might be of help if there are problems with other special characters. But as far my knowledge is concerned the problem arises only with @.
The other method is directly using command line. The command is as follows
export http_proxy=http://username:password@host:port/
Many users think that once they have their proxy settings in main menu's
system->preferences right , they are done. But the apt-get needs the settings to be done through apt.conf file.
@/other special characters in password
One more think to note is that if your password contains '@' it needs to be replaced with %40.I struggled a lot to find this out. This is a bug in ubuntu( for details about the bug refer http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500560 ) . This link might be of help if there are problems with other special characters. But as far my knowledge is concerned the problem arises only with @.
thanks a lot
ReplyDeletethe information on the bug was a great help
thanks. this helped a lot today!
ReplyDelete