CentOS7 YUM代理身份验证失败

CentOS7 YUM代理身份验证失败

我偶然发现我的 CentOS7 服务器有一个小问题。它是代理后面的虚拟服务器,可以连接到互联网,但不能使用 yum。每当我尝试时,我都会收到错误:

Could not retrieve mirrorlist http://mirrorlist.centos.org/? 
release=7&arch=x86_64&repo=os&infra=stock error was
14: HTTP Error 407 - Proxy Authentication Required

即使我配置了代理/etc/环境:

http_proxy='http://user:password@url:8088/'
HTTP_PROXY='http://user:password@url:8088/'
https_proxy='http://user:password@url:8088/'
HTTPS_PROXY='http://user:password@url:8088/'
ftp_proxy='http://user:password@url:8088/'
FTP_PROXY='http://user:password@url:8088/'
no_proxy='localhost,127.0.0.1,localaddress,*.localdomain.com,*.bl.ch,10.*'
NO_PROXY='localhost,127.0.0.1,localaddress,*.localdomain.com,*.bl.ch,10.*'

并在/etc/yum.conf:

proxy=http://url:8088/
proxy_username=user_name
proxy_password=password

我什至在/root/.bash_profile:

export http_proxy="http://url:8088/"

并在/etc/wgetrc:

 http_proxy='http://user:password@url:8088/'
 HTTP_PROXY='http://user:password@url:8088/'
 https_proxy='http://user:password@url:8088/'
 HTTPS_PROXY='http://user:password@url:8088/'
 ftp_proxy='http://user:password@url:8088/'
 FTP_PROXY='http://user:password@url:8088/'
 no_proxy='localhost,127.0.0.1,localaddress,*.localdomain.com,*.bl.ch,10.*'
 NO_PROXY='localhost,127.0.0.1,localaddress,*.localdomain.com,*.bl.ch,10.*'

我真的不明白它怎么仍然缺少身份验证;有人知道如何解决这个问题吗?

相关内容