解決命令行登錄harbor被拒絕的問題
命令行登錄harbor被拒絕
[root@localhost harbor]# docker login -u amdin -p Harbor12345 http://192.168.30.8 WARNING! Using --password via the CLI is insecure. Use --password-stdin. Error response from daemon: Get "https://192.168.30.8/v2/": dial tcp 192.168.30.8:443: connect: connection refused [root@localhost harbor]#
原因
默認(rèn)登陸的是443端口,而我們并沒有啟用
解決方法一
[root@localhost harbor]# docker login -u admin -p Harbor12345 http://127.0.0.1 //使用127.0.0.1的地址登錄 WARNING! Using --password via the CLI is insecure. Use --password-stdin. 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 [root@localhost harbor]#
解決方法二
[root@localhost harbor]# vim /usr/lib/systemd/system/docker.service ExecStart=/usr/bin/dockerd --insecure-registry 192.168.30.8 -H fd:// --containerd=/run/containerd/containerd.sock //指向harbor的IP [root@localhost harbor]# systemctl daemon-reload //重載守護(hù)進(jìn)程 [root@localhost harbor]# systemctl restart docker //重啟docker [root@localhost harbor]# docker login -u admin -p Harbor12345 http://192.168.30.8 //指定IP登陸倉庫 WARNING! Using --password via the CLI is insecure. Use --password-stdin. 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 [root@localhost harbor]#
總結(jié)
以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
Docker在CentOS7下不能下載鏡像timeout的解決辦法(圖解)
本文給大家記錄下Docker在CentOS7下不能下載鏡像timeout問題的解決方法,非常不錯(cuò),具有參考借鑒價(jià)值,感興趣的朋友一起看看吧2016-11-11
Docker容器編譯LNMP的實(shí)現(xiàn)示例
本文主要介紹了Docker容器編譯LNMP,使用Docker容器基于centos鏡像分別制作nginx鏡像,mysql鏡像和php鏡像使用編譯安裝的方式,具有一定的參考價(jià)值,感興趣的可以了解一下2021-12-12
在Centos7 中更改Docker默認(rèn)鏡像和容器的位置
這篇文章主要介紹了在Centos7 下更改Docker默認(rèn)鏡像和容器的位置,需要的朋友可以參考下2017-05-05
基于Docker的微服務(wù)自動(dòng)化部署系統(tǒng)全解析
本文介紹了基于Docker的微服務(wù)自動(dòng)化部署系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn),該系統(tǒng)通過模塊化設(shè)計(jì),包括服務(wù)發(fā)現(xiàn)、容器編排、監(jiān)控告警等功能,實(shí)現(xiàn)了微服務(wù)的自動(dòng)化部署、運(yùn)維和監(jiān)控,提高了部署效率和穩(wěn)定性,感興趣的朋友跟隨小編一起看看吧2026-01-01
Docker部署Kafka以及Spring Kafka實(shí)現(xiàn)
這篇文章主要介紹了Docker部署Kafka以及Spring Kafka實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下2019-10-10
Docker Compose 搭建簡單的Python網(wǎng)絡(luò)應(yīng)用程序(步驟詳解)
在這個(gè)頁面上,你可以建立一個(gè)簡單的Python網(wǎng)絡(luò)應(yīng)用程序,運(yùn)行在Docker Compose上,這篇文章主要介紹了Docker Compose 搭建簡單的Python網(wǎng)絡(luò)應(yīng)用程序,需要的朋友可以參考下2022-07-07
docker 安裝 php-fpm 服務(wù) / 擴(kuò)展 / 配置的示例教程詳解
這篇文章主要介紹了docker 安裝 php-fpm 服務(wù) / 擴(kuò)展 / 配置,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-05-05

