验证阿里云容器镜像的报错问题(Client.Timeout exceeded while awaiting headers和unauthorized: authentication required)

博观而约取,厚积而薄发。这篇文章主要讲述验证阿里云容器镜像的报错问题:Client.Timeout exceeded while awaiting headers和unauthorized: authentication required相关的知识,希望能为你提供帮助。
背景:新开阿里云容器镜像做使用,但是碰到了几个报错需要处理:
验证登录命令:
  docker login --username=holy@*****9    repo-*-registry.cn-shanghai.cr.aliyuncs.com
备注:(*代表我删除的部分名称,实际地址根据后台给的显示)
1、公网IP未放行情况下会报错的提示如下

报错:
Error response from daemon: Get "https://repo-*-registry.cn-shanghai.cr.aliyuncs.com/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
(这时候密码是否输入正确都是这样的报错timeout)
2、IP添加信任名单后报错如下:
unauthorized: authentication required    (提示验证错误,密码是密码错误没有验证通过)


3、IP添加信任名单后,密码也没有输入错误,登录成功,显示成功信息如下
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.

Configure a credential helper to remove this warning. See

https://docs.docker.com/engine/reference/commandline/login/#credentials-store



Login Succeeded


备注:登录是子账号或者主账号,其中登录容器镜像的密码是和阿里云账号密码无关,是得单独“设置固定密码”, 不知道的会用账号对应的密码登录进坑。

【验证阿里云容器镜像的报错问题(Client.Timeout exceeded while awaiting headers和unauthorized: authentication required)】


    推荐阅读