407 Proxy Authentication Required error while using 'apt' to install : Help
Scenario: I connect through a Network Proxy to get to the Internet. This proxy requires a username and password for authentication.
Problem: "apt-get install bla bla" in shell results in error "407 proxy authentication required"
Things I tried: 1. system---> Network proxy (enter correctly)-->Details (Entered Authentication Username and Password there)
2. vi /etc/apt/apt.conf ---> Acquire::http::proxy "http://username:password@<proxy_ip>:<proxy_port>/";
this last one worked yesterday and apt was able to connect to the Internet but today I restarted and it doesn't work now.
Please point out what I'm missing. Thanks. :)
Re: 407 Proxy Authentication Required error while using 'apt' to install : Help
2 things:
1. If your sources.list are http then you use the http proxy in Acquire section, if sources.list are ftp, then you need to modify the http to ftp.
2. It is strange to me that you have a /etc/apt/apt.conf, as it is not present in the apt folder due to a more modular structure in BTr3 and kernel >= 3.x.x.
What you need to do is go to /etc/apt/apt.conf.d and create a file named, let's say 99my_proxy:
Acquire::http::proxy "http://usernameassword@<proxy_ip>:<proxy_port>/";
and save it, then reboot...
You could also use the 70debconf file and add the Acquire::http::proxy "http://usernameassword@<proxy_ip>:<proxy_port>/";
But try the first option first..It is more recommended., since if you alter any of the lines by accident within it, it will cause apt to be unstable and behave in an unwanted manner.
Luck.
Re: 407 Proxy Authentication Required error while using 'apt' to install : Help
Quote:
Originally Posted by
maverik35
2 things:
1. If your sources.list are http then you use the http proxy in Acquire section, if sources.list are ftp, then you need to modify the http to ftp.
2. It is strange to me that you have a /etc/apt/apt.conf, as it is not present in the apt folder due to a more modular structure in BTr3 and kernel >= 3.x.x.
What you need to do is go to /etc/apt/apt.conf.d and create a file named, let's say 99my_proxy:
Acquire::http::proxy "http://usernameassword@<proxy_ip>:<proxy_port>/";
and save it, then reboot...
You could also use the 70debconf file and add the Acquire::http::proxy "http://usernameassword@<proxy_ip>:<proxy_port>/";
But try the first option first..It is more recommended., since if you alter any of the lines by accident within it, it will cause apt to be unstable and behave in an unwanted manner.
Luck.
Thanks for the quick response.
Turns out the cause of this sudden error I got today, was in-fact quite silly. In my Network it is so, that I share this proxy authentication information with another user (long story), so he basically has access to same proxy account. Turns out, today all of a sudden he decided to change the password and before he could inform me, I started accessing 'apt' which was configured to use the old password while authenticating to proxy and was being denied access.
And maverick35, I use BT5R3 and I do have a etc/apt/apt.conf file. I didn't create it myself, it was already there. I just configured it to use authentication. :)
Re: 407 Proxy Authentication Required error while using 'apt' to install : Help
Quote:
Originally Posted by
intellikid
Thanks for the quick response.
Turns out the cause of this sudden error I got today, was in-fact quite silly. In my Network it is so, that I share this proxy authentication information with another user (long story), so he basically has access to same proxy account. Turns out, today all of a sudden he decided to change the password and before he could inform me, I started accessing 'apt' which was configured to use the old password while authenticating to proxy and was being denied access.
And maverick35, I use BT5R3 and I do have a etc/apt/apt.conf file. I didn't create it myself, it was already there. I just configured it to use authentication. :)
It surprise me..Unless you are using a < than R3 version, the structure is different. I have my own BT5 r3 with /etc/apt/apt.conf.d and no apt.conf under /etc/apt....
Luck.