centos 7 ntlm代理无法访问docker或epel repo

时间:2018-01-22 17:38:54

标签: curl proxy centos7 yum ntlm

我需要通过公司代理联系epel和docker repo,到目前为止,我已经完成了以下工作:

  1. 下载并安装了cntlm,cntlm -c /etc/cntlm.conf
    cntlm.conf有以下信息 Username user1 Domain org.daqomx.co.uk Password myDomainPassword Proxy proxy1.org.daqomx.co.uk:8080 Listen 3128
  2. /etc/yum.conf中 proxy=http://127.0.0.1:3128/ proxy_username=user1 proxy_password=myDomainPassword
  3. env | grep -i http http_proxy=http://localhost:3128/ https_proxy=http://localhost:3128/
  4. 结果:

    • yum update适用于Centos-Base.repo
     $ sudo yum update
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     - base: ftp.lysator.liu.se
     - extras: ftp.lysator.liu.se
     - updates: centos.mirror.transip.nl
    Resolving Dependencies
    --> Running transaction check
    ---> Package bind-libs-lite.x86_64 32:9.9.4-51.el7_4.1 will be updated
    ---> Package bind-libs-lite.x86_64 32:9.9.4-51.el7_4.2 will be an update
    ---> Package bind-license.noarch 32:9.9.4-51.el7_4.1 will be updated
    ---> Package bind-license.noarch 32:9.9.4-51.el7_4.2 will be an update
    

    但是,如果我添加epel.repo或docker.repo,yum就会失败,

     One of the configured repositories failed (Unknown),
    ...
    Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
    
    • curl适用于--proxy-ntlm选项
    $ curl -k --proxy-ntlm -U user1:myDomainPassword https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml
    
    `?xml version="1.0" encoding="UTF-8"?>
    ...
    

    问题: 如何启用epel或docker repo?
    docker repo有baseurl = https://yum.dockerproject.org/repo/main/centos/7/ epel repo有metalink = https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch= $ basearch
    尝试将gpgcheck切换为0.没有快乐。
    那些回购文件很好,因为我在家里尝试它们没有代理,他们工作。

0 个答案:

没有答案