Docker login Forbidden

I’m trying to use the container registry feature of Gitea(1.18.0), but somehow I cannot authenticate on the server.
Server is running in a docker container.

[root@server app]# docker login X.26.9.3:3000
Username: myuser
Password:
Error response from daemon: Get "https://X.26.9.3:3000/v2/": Forbidden

If I try to push and image, I get similar error:

[root@server app]# docker image push X.26.9.3:3000/myuser/haproxy/customimage:latest
The push refers to repository [X.26.9.3:3000/myuser/haproxy/customimage]
Get "https://X.26.9.3:3000/v2/": Forbidden

What am I doing wrong here?
In the logs, I do not see any mention of failed authentication.

Eventually I figured:
Since this is an air-gaped system, I had to add a proxy configuration to my docker service like this:

[root@server~]# cat /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment=“HTTP_PROXY=X.26.9.5:3128”
Environment=“HTTPS_PROXY=X.26.9.5:3128”
Environment=“NO_PROXY=localhost,127.0.0.1/8,X.26.9.3”

turns out, I had to exclude my local Gitea address from this so Docker could reach it within my network.
so just had to add one more entry in the NO_PROXY section.

1 Like