往harbor服务器推镜像失败
往harbor服务器推镜像失败
1、Docker客户端配置正确,包括daemon.json中的 insecure registries 或者 credentials helpers 设置。
{
"registry-mirrors": [ "https://ddddvhbmg.mirror.aliyuncs.com"], //阿里云账户加速器
"insecure-registries":["https://hub-reg.xxx.com","127.0.0.1:5000"]
}
systemctl daemon-reload
systemctl restart docker
2、清除本地的Docker认证缓存:
mv ~/.docker/config.json config.json.bak
docker logout hub-reg.xxx.com
3、重新登录Harbor仓库:
docker login -u admin -p yyyy hub-reg.xxx.com
4、尝试手动推送一个镜像到Harbor
docker push hub-reg.xxx.comyour-repo/your-image:tag