Could not push image: unauthorized: unauthorized to access repository: jenkins push镜像到私仓harbor权限问题解决

问题原因

没有权限,但是因为我的jenkins是在容器里跑的,网上的解决办法都是复制仓库的认证config文件到jenkins家目录下,试了整个晚上都不行,郁闷死了,看着别人的不管是直接部署还是容器都可以,而且我也给了权限

最后在哪个docke插件的文档里找到了解决办法:https://plugins.jenkins.io/docker-build-step/


Could not push image: unauthorized: unauthorized to access repository: jenkins push镜像到私仓harbor权限问题解决


解决办法

push 镜像的时候要填写帐密做认证


Could not push image: unauthorized: unauthorized to access repository: jenkins push镜像到私仓harbor权限问题解决

这里的用户名密码即为登录harbor的用户名密码


Could not push image: unauthorized: unauthorized to access repository: jenkins push镜像到私仓harbor权限问题解决


Could not push image: unauthorized: unauthorized to access repository: jenkins push镜像到私仓harbor权限问题解决

镜像push成功了,报错是其他原因


Could not push image: unauthorized: unauthorized to access repository: jenkins push镜像到私仓harbor权限问题解决


Could not push image: unauthorized: unauthorized to access repository: jenkins push镜像到私仓harbor权限问题解决

上一篇:有手就行2——持续集成环境——Jenkins安装


下一篇:Centos7搭建Jenkins