harbor denied requested access to the resource is denied问题
denied: requested access to the resource is denied
这个问题主要是,需要使用命令去登录下harbor
然后登录成功,会在/root/.docker/config.json 有文件生成,下次应该是不会denied了,如果还有denied,则去掉这个文件中的auth键值对即可。
[root@k8s1 harbor]# docker login 192.168.1.193
Username: admin
Password:
Login Succeeded
[root@k8s1 harbor]# docker push 192.168.1.193/library/kubernetes-dashboard-amd64:v1.8.3
The push refers to a repository [192.168.1.193/library/kubernetes-dashboard-amd64]
19d384dcffcc: Pushed
b0a13438d0d3: Pushed
5dacd731af1b: Pushed
v1.8.3: digest: sha256:f5aab36815a33016d4375ce6468a2f1453dbaf47a53f8c7df69a9f6865045ef4 size: 948
[root@k8s1 harbor]#
第二次不会denied了:
[root@k8s1 harbor]# docker tag docker.io/nginx 192.168.1.193/library/dockersea1
[root@k8s1 harbor]# docker push 192.168.1.193/library/dockersea1
The push refers to a repository [192.168.1.193/library/dockersea1]
fc4c9f8e7dac: Pushed
912ed487215b: Pushed
5dacd731af1b: Mounted from library/kubernetes-dashboard-amd64
latest: digest: sha256:c10f4146f30fda9f40946bc114afeb1f4e867877c49283207a08ddbcf1778790 size: 948
[root@k8s1 harbor]#
然后就可以看到了,真的是太坑了啊。。。