Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

597
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda