I have configured Harbor docker registry in GCP compute engine (hostname : harbor ) , as I have not installed any certificate I am able to access the registry through http (port 80) & from client end (within same VPC of harbor registry compute engine) I have configured docker insecure registry as below
[root@client docker]# cat /etc/docker/daemon.json
{
"insecure-registries" : [
"harbor:80",
"<external-ip>:80",
"10.128.0.20:80"
],
"debug" : true,
"experimental" : true
}
but while I am trying to login into the docker registry I am getting bellow error (it's automatically hitting my registry in port 443 not 80)
[root@client docker]# docker login -u "####" -p "####" harbor
Error response from daemon: Get https://harbor/v1/users/: dial tcp 10.128.0.20:443: connect: connection refused
Could you please help me resolve the issue
It seems to pick the wrong port, 443. Try adding a port explicitly: docker login -u "####" -p "####" harbor:80
. Note I strongly recommend against using authentication over unencrypted channels (HTTP vs HTTPS). Perhaps docker login
is smart enough to refuse to do it.