windows推送Harbor认证失败:unauthorized to access repository
问题分析
Win10系统,使用的Harbor开源私有仓库,使用的Google JibDocker打包插件。
上传打包都正常,就是使用skaffold部署报错 unauthorized to access repository:action:push
解决
当前用户目录下 .docker文件夹下 config.json
编辑config.json
{
"auths": {
"harbor.ninexch.com": {
"auth": "username:password使用base64加密",
"email": "Harbor注册时的邮箱地址"
}
},
"credHelpers": {
"gcr.io": "gcloud",
"us.gcr.io": "gcloud",
"eu.gcr.io": "gcloud",
"asia.gcr.io": "gcloud",
"staging-k8s.gcr.io": "gcloud",
"marketplace.gcr.io": "gcloud"
}
}
上述配置中:
"auths": {
"harbor.ninexch.com": {
"auth": "username:password使用base64加密",
"email": "Harbor注册时的邮箱地址"
}
}
在harbor的安装服务器的根目录下.docker/config.json中可以拿到