0

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

Satwik
  • 25
  • 4

1 Answers1

0

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.

Ronald
  • 1,009
  • 6
  • 13
  • Thanks it's working for me , actually I am working on test environment , so not installed CA certified certificate yet . Thanks again – Satwik May 31 '20 at 14:36