1.如下
[root@k8s-node-1 yum.repos.d]# yum install git -y
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to download.docker.com:443; 操作现在正在进行"
正在尝试其它镜像。
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to download.docker.com:443; 操作现在正在进行"
正在尝试其它镜像。
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to download.docker.com:443; 操作现在正在进行"
正在尝试其它镜像。
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to download.docker.com:443; 操作现在正在进行"
正在尝试其它镜像。
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to download.docker.com:443; 操作现在正在进行"
正在尝试其它镜像。
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to download.docker.com:443; 操作现在正在进行"
正在尝试其它镜像。
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to download.docker.com:443; 操作现在正在进行"
正在尝试其它镜像。
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to download.docker.com:443; 操作现在正在进行"
正在尝试其它镜像。
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to download.docker.com:443; 操作现在正在进行"
正在尝试其它镜像。
^Chttps://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
正在尝试其它镜像。
解决
这是由于国内访问不到docker官方镜像的缘故
可以通过aliyun的源来完成:
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo