use*_*284 8 command-line apt authentication networking proxy
我想访问互联网以从安全代理网络上的终端更新文件等。我已经尝试过以下方法:
添加到/etc/apt/apt.conf
, /etc/apt/apt.conf.d/01proxy
, /etc/apt/apt.conf.d/01ubuntu
:
Acquire::http::proxy "http://name:password@proxy_server:port";
Run Code Online (Sandbox Code Playgroud)export http_proxy=http://name:password@proxy_server:port/
在一个终端上。
export http_proxy=http://name:password@proxy_server:port/
到/etc/bash.bashrc
这些只是少数主要的努力。我的用户名中没有空格,密码中也没有任何特殊字符(尤其是“@”)。我已经仔细检查过,输入的所有信息都是正确的。信息是正确的,因为它适用于浏览器(网络中的手动代理和首次打开浏览器时的身份验证)。我也试过将“proxy”中的“p”变成大写,但没用。我总是收到错误: 407 Proxy Authentication Required.
感谢任何帮助。
测试这个:
sudo su -
apt-get update
apt-get install ntlmaps
Run Code Online (Sandbox Code Playgroud)
配置:域、用户名、密码、proxyserver.net、端口
文件:
/etc/bash.bashrc
export http_proxy=http://127.0.0.1:5865
export https_proxy=http://127.0.0.1:5865
export ftp_proxy=http://127.0.0.1:5865
Run Code Online (Sandbox Code Playgroud)
/etc/environment
http_proxy=http://127.0.0.1:5865
https_proxy=http://127.0.0.1:5865
ftp_proxy=http://127.0.0.1:5865
Run Code Online (Sandbox Code Playgroud)
/etc/apt/apt.conf
(如果文件不存在则创建)
Acquire::http::Proxy "http://127.0.0.1:5865";
Acquire::https::Proxy "http://127.0.0.1:5865";
Acquire::ftp::Proxy "http://127.0.0.1:5865";
Run Code Online (Sandbox Code Playgroud)