解決命令行登錄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]#
原因
默認(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 //重載守護進程 [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在CentOS7下不能下載鏡像timeout的解決辦法(圖解)
本文給大家記錄下Docker在CentOS7下不能下載鏡像timeout問題的解決方法,非常不錯,具有參考借鑒價值,感興趣的朋友一起看看吧2016-11-11
在Centos7 中更改Docker默認(rèn)鏡像和容器的位置
這篇文章主要介紹了在Centos7 下更改Docker默認(rèn)鏡像和容器的位置,需要的朋友可以參考下2017-05-05
基于Docker的微服務(wù)自動化部署系統(tǒng)全解析
本文介紹了基于Docker的微服務(wù)自動化部署系統(tǒng)的設(shè)計與實現(xiàn),該系統(tǒng)通過模塊化設(shè)計,包括服務(wù)發(fā)現(xiàn)、容器編排、監(jiān)控告警等功能,實現(xiàn)了微服務(wù)的自動化部署、運維和監(jiān)控,提高了部署效率和穩(wěn)定性,感興趣的朋友跟隨小編一起看看吧2026-01-01
Docker部署Kafka以及Spring Kafka實現(xiàn)
這篇文章主要介紹了Docker部署Kafka以及Spring Kafka實現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下2019-10-10
Docker Compose 搭建簡單的Python網(wǎng)絡(luò)應(yīng)用程序(步驟詳解)
在這個頁面上,你可以建立一個簡單的Python網(wǎng)絡(luò)應(yīng)用程序,運行在Docker Compose上,這篇文章主要介紹了Docker Compose 搭建簡單的Python網(wǎng)絡(luò)應(yīng)用程序,需要的朋友可以參考下2022-07-07
docker 安裝 php-fpm 服務(wù) / 擴展 / 配置的示例教程詳解
這篇文章主要介紹了docker 安裝 php-fpm 服務(wù) / 擴展 / 配置,本文通過實例代碼給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-05-05

