Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

598
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda