Error response from daemon: Get https: x509: certificate signed by unknown authority

2560 단어 UbuntuDcoker
Harbor 서버에 다른 장치docker login *.*.*.*로 로그인할 때 다음 오류가 발생했습니다.
python@job:/lib/systemd/system$ docker login 192.168.0.19
Username: 
Password: 
Error response from daemon: Get https://192.168.0.19/v2/: x509: certificate signed by unknown authority


기본적으로,client와Registry의 상호작용은 https를 통해 통신됩니다.Registry를 설치할 때 tls와 관련된 키와crt 파일을 설정하지 않으면 https 접근이 실패합니다."– insecure-registry"를 사용하면 클라이언트와 레지스트리가 http 방식으로 통신하도록 지정할 수 있습니다./lib/systemd/system/docker를 수정합니다.서비스 파일의 ExecStart= 줄:
ExecStart=/usr/bin/dockerd -H fd:// --insecure-registry=192.168.0.19

docker 서비스를 다시 불러오고 다시 시작하며 설정이 적용되는지 확인합니다.
python@job:/lib/systemd/system$ systemctl daemon-reload
python@job:/lib/systemd/system$ systemctl restart docker
python@job:/lib/systemd/system$ docker info
Containers: 3
 Running: 0
 Paused: 0
 Stopped: 3
Images: 3
Server Version: 18.06.1-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version:  (expected: 468a545b9edcd5932818eb9de8e72413e616e86e)
runc version: N/A (expected: 69663f0bd4b60df09991c08812a60108003fa340)
init version: v0.18.0 (expected: fec3683b971d9c3ef73f284f176672c44b448662)
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.15.0-45-generic
Operating System: Ubuntu 18.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.767GiB
Name: job
ID: QEFB:RN3P:NDXW:6MGB:DL7Y:URYR:75J5:ODXV:YFAK:ARV3:KXII:QGWO
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 192.168.0.19
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support


볼 수 있다
Insecure Registries:
 192.168.0.19
 127.0.0.0/8

그리고 접속:
python@job:/lib/systemd/system$ docker login 192.168.0.19
Username: 
Password: 
WARNING! Your password will be stored unencrypted in /home/python/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

좋은 웹페이지 즐겨찾기