0

My need to reach epel and docker repo through company proxy, so far I've done below:

  1. downloaded and installed cntlm, cntlm -c /etc/cntlm.conf
    cntlm.conf has below info 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/

The result:

  • yum update works with 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

However, if i add epel.repo or docker.repo, yum fails,

 One of the configured repositories failed (Unknown),
...
Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
  • curl works with --proxy-ntlm option
$ 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"?>
...

Problem: How do I enable epel or docker repo?
docker repo has baseurl=https://yum.dockerproject.org/repo/main/centos/7/ epel repo has metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
Tried switch gpgcheck to 0. No joy.
Those repo files are fine, as i tried them at home without proxy and they work.

Kai Zhang
  • 155
  • 1
  • 9
  • check XoR's answer here : https://stackoverflow.com/questions/26734777/yum-error-cannot-retrieve-metalink-for-repository-epel-please-verify-its-path – Eugène Adell Jan 22 '18 at 20:04
  • tried that. commenting all entries starting with mirrorlist=... and uncommenting all the entries starting with baseurl=..... `http://download.fedoraproject.org/pub/epel/7/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 302 - Found` – Kai Zhang Jan 23 '18 at 15:24

0 Answers0