GPG key retrieval failed: [Errno 12] Timeout on https://download.docker.com/linux/centos/gpg: (28, 'Operation timed out after 30001 milliseconds with 0 out of 0 bytes received')

【问题】
安装docker出现的问题
GPG key retrieval failed: [Errno 12] Timeout on https://download.docker.com/linux/centos/gpg: (28, 'Operation timed out after 30001 milliseconds with 0 out of 0 bytes received')
【原因】
由于国内访问不到docker官方镜像的缘故
【解决】
执行命令
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
执行后结果:

其本质是修改了docker-ce.repo文件,文件路径:/etc/yum.repos.d/docker-ce.repo

posted @ 2020-10-26 13:22  changlinlo  阅读(2447)  评论(0编辑  收藏  举报