![无法在 Debian 10 buster 上通过公司代理更新 apt https 存储库(“从代理读取失败”)](https://linux22.com/image/749366/%E6%97%A0%E6%B3%95%E5%9C%A8%20Debian%2010%20buster%20%E4%B8%8A%E9%80%9A%E8%BF%87%E5%85%AC%E5%8F%B8%E4%BB%A3%E7%90%86%E6%9B%B4%E6%96%B0%20apt%20https%20%E5%AD%98%E5%82%A8%E5%BA%93%EF%BC%88%E2%80%9C%E4%BB%8E%E4%BB%A3%E7%90%86%E8%AF%BB%E5%8F%96%E5%A4%B1%E8%B4%A5%E2%80%9D%EF%BC%89.png)
尝试apt-get update
在配置了 apt 代理的 Debian 10 主机上运行 https 存储库。此示例显示尝试从 grafana apt 存储库更新时的输出:
# cat /etc/apt/sources.list.d/grafana.list
deb https://packages.grafana.com/oss/deb stable main
# apt-get update
Err:1 https://packages.grafana.com/oss/deb stable InRelease
Reading from proxy failed - select (115: Operation now in progress) [IP: xxx.xxx.xxx.xxx 8080]
Reading package lists... Done
W: Failed to fetch https://packages.grafana.com/oss/deb/dists/stable/InRelease Reading from proxy failed - select (115: Operation now in progress) [IP: xxx.xxx.xxx.xxx 8080]
W: Some index files failed to download. They have been ignored, or old ones used instead.
上面的xxx.xxx.xxx.xxx是代理的IP地址。
细节:
- 代理检查 https 流量,并在主机上安装相应的代理 CA 证书
- 在 Debian stretch (9) 上配置的相同 apt 存储库可以更新,而不会出现上述错误。stretch 主机使用相同的代理 CA 证书。
https://packages.grafana.com/oss/deb/dists/stable/InRelease
使用以下 curl 命令可以下载该 URL ,且不会出现任何错误:
curl --proxy http://proxy.domain.com:8080 https://packages.grafana.com/oss/deb/dists/stable/InRelease
- 代理管理员表示,在这些连接尝试期间,代理本身没有出现任何错误
- 代理上没有使用身份验证。
- 我尝试使用
Acquire::https::packages.grafana.com::CaInfo
apt 参数明确指定代理证书,但这并没有改变任何东西(可能这不是证书问题)。此外,我一直在尝试No-Cache
aptQueue-Mode
参数,但没有成功。 - 我试图放宽与 TLS 协议相关的 openssl.cnf 设置但无济于事(不确定 apt 是否使用了这些设置):
[system_default_sect]
MinProtocol = None
CipherString = DEFAULT
无论我怎么尝试,我都无法在代理后面的 Debian 10 上使用 https 存储库。有人遇到过这种情况吗?
答案1
问题似乎出在 Web 代理本身。升级后修复了几个 SSL 检查问题,问题就解决了。