解決命令行登錄harbor被拒絕的問題
更新時間:2025年09月22日 09:52:01 作者:還行少年
Harbor命令行登錄被拒絕因未啟用443端口,解決方法包括配置SSL證書啟用HTTPS或調(diào)整防火墻設(shè)置,基于個人經(jīng)驗,供參考
命令行登錄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]#
原因
默認登陸的是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 //重載守護進程 [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é)
以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
Docker 數(shù)據(jù)卷權(quán)限實例詳解
這篇文章主要介紹了Docker 數(shù)據(jù)卷權(quán)限實例詳解的相關(guān)資料,在運行Docker 容器的時候需要添加權(quán)限,這里就給大家舉例說明如何實現(xiàn),需要的朋友可以參考下2016-11-11
docker部署Prometheus+Cadvisor+Grafana實現(xiàn)服務(wù)器監(jiān)控
這篇文章主要為大家介紹了docker部署Prometheus+Cadvisor+Grafana實現(xiàn)服務(wù)器監(jiān)控,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪2023-11-11
基于Docker+Jenkins實現(xiàn)自動化部署的方法
這篇文章主要介紹了基于Docker+Jenkins實現(xiàn)自動化部署,本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-07-07
Docker學習筆記之Docker部署Java web系統(tǒng)
這篇文章主要介紹了Docker學習筆記之Docker部署Java web系統(tǒng),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-02-02

