0

I am trying to set proxy for APT so I can update.

The server is behind a proxy which is in the domain. I have tried the following in /etc/apt/apt.conf

  1. for FTP, HTTP, https

    Acquire::HTTP::Proxy "http://[domain\user[:Password02#]@10.1.1.8:8080/";
    
  2. Also tried

    Acquire::http::Proxy "http://domain\user:Password02#]@10.1.1.8:8080/";
    
  3. Also tried

    Acquire::http::Proxy "http:/user@domain.com:Password02#]@10.1.1.8:8080/";
    

I always get the error below:

root@canonical:/etc/apt# apt-get update

  407  Proxy Authorization Required

Reading package lists... Done
W: The repository 'http://security.ubuntu.com/ubuntu xenial-security Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://za.archive.ubuntu.com/ubuntu xenial Release' does 

How can I set up my proxy correctly?

fosslinux
  • 3,831
tho
  • 9
  • 1
  • 3
  • Well, 3. is an invalid URL. Schema and the remainder are not separated by ://. Furthermore 3. cannot work because it contains two @ characters. These are used to separate username[+password] from the server name and URI. My guess would be that the issue is the backslash in the user name. And that should be something that I'd expect to be configurable on the proxy server (e.g. by defining a default domain). Also if your password or user name has funky characters, that'll probably also cause trouble here. Try to stick to alphanumeric characters. – 0xC0000022L May 24 '18 at 19:13

1 Answers1

1
Acquire::http::Proxy "http://user:password@10.1.1.8:8080";
Acquire::https::Proxy "http://user:password@10.1.1.8:8080";
Acquire::ftp::Proxy "http://user:password@10.1.1.8:8080";
muclux
  • 5,154