Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker login on private nexus => Error response from daemon: login attempt to http://ip:port/v2/ failed with status: 404 Not Found

Tags:

docker

nexus

I try to push a docker image to my private Nexus 3 registry.

Before to push, i try to authenticate doing : docker login nexus_host:nexus_port

But i got the following error message :

Error response from daemon: login attempt to http://nexus_host:nexus_port/v2/ failed with status: 404 Not Found

My Nexus use HTTP, so add it in docker insecure registries list.

  • Nexus version : Nexus Repository Manager OSS 3.9.0-01
  • Docker version : 17.09.1-ce (Windows 10)

EDIT (08/03/2018) :

I use a hosted docker repository. Should i use a HTTP connector ?

Repo Configuration :
Format : docker
Type : hosted
URL : http://192.168.0.90:8082/repository/docker-repo/
HTTP connector port : 1111

Login attempts :

docker login 192.168.0.90:8082 => Error response from daemon: login attempt to http://192.168.0.90:8082/v2/ failed with status: 404 Not Found

docker login 192.168.0.90:1111 => Error response from daemon: Get https://192.168.0.90:1111/v2/: dial tcp 192.168.0.90:1111: getsockopt: connection refused

like image 997
Loïc Avatar asked Mar 06 '18 09:03

Loïc


1 Answers

The correct command to login into your docker repository is docker login 192.168.0.90:1111, because you've enabled HTTP connector on port 1111.

Please make sure that you have checked Force basic authentication in your docker repository settings and for docker login use the same credentials as you do to access your instance of Nexus Repository Manager.

If the above doesn't help, then you should focus on what's causing the connection to be refused - please check if there are any firewalls between you and the Nexus blocking port 1111 (your docker repository connector port).

like image 66
Dawid Sawa Avatar answered Oct 16 '22 16:10

Dawid Sawa