Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

588
Views
Issue "Could not fetch/save url https://download.docker.com/linux/centos/docker-ce.repo"

I am trying to set up the Docker repository on CentOS, after I run the command

$ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

I am getting error message:

Could not fetch/save url https://download.docker.com/linux/centos/docker-ce.repo to file /etc/yum.repos.d/docker-ce.repo: [Errno 12] Timeout on https://download.docker.com/linux/centos/docker-ce.repo: (28, 'Operation timed out after 30005 milliseconds with 0 out of 0 bytes received')

I am following the docker documentation to set up the repository.

Step 1: Install required packages. yum-utils provides the yum-config-manager utility, and device-mapper-persistent-data and lvm2 are required by the devicemapper storage driver.

$ sudo yum install -y yum-utils device-mapper-persistent-data lvm2

Step 2: Use the following command to set up the stable repository.

$ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Expected result: System should download the files.

Actual result: Not able to download the files.

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

I have the same problem but I solved it by updating the yum config file, just add timeout=120 to /etc/yum.conf:

cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release

#add timeout here
timeout=120

Set timeout to 2 min (or 3 min = 180), restart the server then re-run your command.

NOTE: you need to edit the yum.conf file as a super user in order to be able to save your changes.

  • To switch to super user run next:
sudo -i
  • To edit your file and save the changes use the nano editor (or Vi).

I think that it is not necessarily a good solution but it worked well for me.

Should help!

over 4 years ago · Santiago Trujillo Report

0

By adding this to my /etc/yum.conf file

add timeout here

timeout=300.

It fixed the problem.

over 4 years ago · Santiago Trujillo Report

0

If you face any error while trying to create a stable docker repo, You may use the following command.

Command:

curl --silent -SL https://get.docker.com/ | sh
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!